-/* $Id$ */
+/*
+ * Copyright (c) 2002-2005 The Regents of The University of Michigan
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
#include "arch/alpha/alpha_memory.hh"
#include "arch/alpha/isa_traits.hh"
-/* $Id$ */
+/*
+ * Copyright (c) 2002-2004 The Regents of The University of Michigan
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
#ifndef __ARCH_ALPHA_EV5_HH__
#define __ARCH_ALPHA_EV5_HH__
// -*- mode:c++ -*-
+//Copyright (c) 2003, 2004, 2005
+//The Regents of The University of Michigan
+//All Rights Reserved
+
+//This code is part of the M5 simulator, developed by Nathan Binkert,
+//Erik Hallnor, Steve Raasch, and Steve Reinhardt, with contributions
+//from Ron Dreslinski, Dave Greene, Lisa Hsu, Ali Saidi, and Andrew
+//Schultz.
+
+//Permission is granted to use, copy, create derivative works and
+//redistribute this software and such derivative works for any purpose,
+//so long as the copyright notice above, this grant of permission, and
+//the disclaimer below appear in all copies made; and so long as the
+//name of The University of Michigan is not used in any advertising or
+//publicity pertaining to the use or distribution of this software
+//without specific, written prior authorization.
+
+//THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
+//UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
+//WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
+//IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
+//MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
+//THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
+//INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+//DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
+//WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
+//ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
////////////////////////////////////////////////////////////////////
//
// Alpha ISA description file.
#ifndef __ALPHA_ACCESS_H__
#define __ALPHA_ACCESS_H__
-/* @file
+/** @file
* System Console Memory Mapped Register Definition
*/
-#define ALPHA_ACCESS_VERSION (1301) /* CH++*/
+#define ALPHA_ACCESS_VERSION (1301)
#ifndef CONSOLE
#include <iosfwd>
+/*
+ * Copyright (c) 2004 The Regents of The University of Michigan
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
#ifndef __KERN_LINUX_ALIGNED_HH__
#define __KERN_LINUX_ALIGNED_HH__
+
#include "sim/host.hh"
#include "targetarch/isa_traits.hh"
+/*
+Copyright 1990 Hewlett-Packard Development Company, L.P.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to
+do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
#ifndef __KERN_LINUX_HWRPB_HH__
#define __KERN_LINUX_HWRPB_HH__
namespace Linux {
struct pcb_struct {
- uint64_ta ksp;
- uint64_ta usp;
- uint64_ta ptbr;
- uint32_t pcc;
- uint32_t asn;
- uint64_ta unique;
- uint64_ta flags;
+ uint64_ta rpb_ksp;
+ uint64_ta rpb_usp;
+ uint64_ta rpb_ptbr;
+ uint32_t rpb_cc;
+ uint32_t rpb_psn;
+ uint64_ta rpb_unique;
+ uint64_ta rpb_fen;
uint64_ta res1, res2;
};
}
#define __LINUX_SCHED_H__
#include "targetarch/isa_traits.hh"
-#include "kern/linux/atomic.hh"
-#include "kern/linux/list.hh"
-#include "kern/linux/wait.hh"
-#include "kern/linux/timer.hh"
-#include "kern/linux/pid.hh"
#include "kern/linux/aligned.hh"
namespace Linux {
-
- struct rlimit {
- uint64_ta rlim_cur;
- uint64_ta rlim_max;
- };
-
- const uint32_t RLIM_NLIMITS = 11;
-
struct task_struct {
- int64_ta state; /* -1 unrunnable, 0 runnable, >0 stopped */
- Addr_a thread_info;
- atomic_t usage;
-
- uint64_ta flags; /* per process flags, defined below */
- uint64_ta ptrace;
-
- int32_t lock_depth; /* Lock depth */
-
- int32_t prio, static_prio;
-
- struct list_head run_list;
- Addr_a array;
-
- uint64_ta sleep_avg;
- int64_ta interactive_credit;
- uint64_ta timestamp;
- int32_t activated;
-
- uint64_ta policy;
- uint64_ta cpus_allowed;
- uint32_t time_slice, first_time_slice;
-
- struct list_head tasks;
- struct list_head ptrace_children;
- struct list_head ptrace_list;
-
- Addr_a mm, active_mm;
-
- /* task state */
- Addr_a binfmt;
- int32_t exit_code, exit_signal;
- int32_t pdeath_signal; /* The signal sent when the parent dies */
- /* ??? */
- uint64_ta personality;
- int32_t did_exec:1;
+ uint8_t junk1[0xf4];
int32_t pid;
- int32_t __pgrp; /* Accessed via process_group() */
- int32_t tty_old_pgrp;
- int32_t session;
- int32_t tgid;
- /* boolean value for session group leader */
- int32_t leader;
- /*
- * pointers to (original) parent process, youngest child, younger sibling,
- * older sibling, respectively. (p->father can be replaced with
- * p->parent->pid)
- */
- Addr_a real_parent; /* real parent process (when being debugged) */
- Addr_a parent; /* parent process */
- struct list_head children; /* list of my children */
- struct list_head sibling; /* linkage in my parent's children list */
- Addr_a group_leader; /* threadgroup leader */
-
- /* PID/PID hash table linkage. */
- struct pid_link pids[PIDTYPE_MAX];
-
- wait_queue_head_t wait_chldexit; /* for wait4() */
- Addr_a vfork_done; /* for vfork() */
- Addr_a set_child_tid; /* CLONE_CHILD_SETTID */
- Addr_a clear_child_tid; /* CLONE_CHILD_CLEARTID */
-
- uint64_ta rt_priority;
- uint64_ta it_real_value, it_prof_value, it_virt_value;
- uint64_ta it_real_incr, it_prof_incr, it_virt_incr;
- struct timer_list real_timer;
- struct list_head posix_timers; /* POSIX.1b Interval Timers */
- uint64_ta utime, stime, cutime, cstime;
- uint64_ta nvcsw, nivcsw, cnvcsw, cnivcsw; /* context switch counts */
+ uint8_t junk2[0x190];
uint64_ta start_time;
- /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */
- uint64_ta min_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap;
- /* process credentials */
- uint32_t uid,euid,suid,fsuid;
- uint32_t gid,egid,sgid,fsgid;
- Addr_a group_info;
- uint32_t cap_effective, cap_inheritable, cap_permitted;
- int32_t keep_capabilities:1;
- Addr user;
- /* limits */
- struct rlimit rlim[RLIM_NLIMITS];
- uint16_t used_math;
+ uint8_t junk3[0x5c];
char comm[16];
};
namespace Linux {
struct thread_info {
- struct pcb_struct pcb; /* palcode state */
-
- Addr_a task; /* main task structure */
- uint32_t flags; /* low level flags */
- uint32_t ieee_state; /* see fpu.h */
-
- Addr_a exec_domain; /* execution domain */
- uint64_ta addr_limit; /* thread address space */
- int64_ta cpu; /* current CPU */
- int32_t preempt_count; /* 0 => preemptable, <0 => BUG */
-
- int32_t bpt_nsaved;
- uint64_ta bpt_addr[2]; /* breakpoint handling */
- uint32_t bpt_insn[2];
-
- /*restart_block;*/
+ struct pcb_struct pcb;
+ Addr_a task;
};
}
#endif /* __ALPHA_THREAD_INFO_H__ */
'xmms': 'other', #
'zap_pmd_range': 'bufmgt', # mm/memory.c,
'zap_pte_range': 'bufmgt', # mm/memory.c,
- 'zone_statistics' : 'bufmgt' # mm/page_alloc.c,
+ 'zone_statistics' : 'bufmgt', # mm/page_alloc.c,
+ 'libaprutil-0.so.0' : 'user',
+ 'libapr-0.so.0' : 'user',
+ 'httpd' : 'user',
+ 'do_tcp_sendpages': 'copy',
+ 'tcp_setsockopt' : 'stack',
+ 'sys_setsockopt' : 'stack',
+ 'do_sendfile' : 'copy',
+ 'ip_route_output_slow': 'stack',
+ 'tcp_sendpage': 'copy',
+ 'file_send_actor': 'copy',
+ 'flush_tlb_page': 'bufmgt',
+ 'sock_common_setsockopt': 'stack',
+ 'sock_sendpage': 'copy',
+
+#
+# New functions
+#
+
+ '__alloc_percpu': 'bufmgt', # mm/slab.c, include/linux/percpu.h,
+ '__pskb_pull_tail': 'stack', # net/core/skbuff.c, include/linux/skbuff.h,
+ '__reml': 'other', # arch/alpha/kernel/alpha_ksyms.c,
+ '__tasklet_hi_schedule': 'interrupt', # kernel/softirq.c,
+ '__tcp_checksum_complete_user': 'stack', # net/ipv4/tcp_input.c,
+ '__tcp_v4_lookup_listener': 'stack', # net/ipv4/tcp_ipv4.c,
+ '__tcp_v4_rehash': 'stack', # net/ipv4/tcp_ipv4.c,
+ '__tcp_westwood_fast_bw': 'stack', # net/ipv4/tcp_input.c,
+ '__tcp_westwood_slow_bw': 'stack', # net/ipv4/tcp_input.c,
+ '__xfrm_policy_check': 'stack', # net/xfrm/xfrm_policy.c,
+ 'alcor_disable_irq': 'interrupt', # arch/alpha/kernel/sys_alcor.c,
+ 'alpha_read_fp_reg': 'other', # arch/alpha/lib/fpreg.c, arch/alpha/kernel/proto.h, arch/alpha/math-emu/math.c, include/asm-alpha/fpu.h,
+ 'atkbd_probe': 'other', # drivers/input/keyboard/atkbd.c,
+ 'background_writeout': 'bufmgt', # mm/page-writeback.c, mm/page-writeback.c,
+ 'bad_page': 'bufmgt', # mm/page_alloc.c,
+ 'batch_entropy_process': 'other', # drivers/char/random.c, drivers/char/random.c,
+ 'block_hotplug_filter': 'driver', # drivers/block/genhd.c,
+ 'brioctl_set': 'stack', # net/socket.c, include/linux/if_bridge.h,
+ 'cdev_put': 'fs', # fs/char_dev.c, include/linux/cdev.h,
+ 'change_protection': 'bufmgt', # mm/mprotect.c,
+ 'check_timer_failed': 'interrupt', # kernel/timer.c,
+ 'clipper_disable_irq': 'interrupt', # arch/alpha/kernel/sys_dp264.c,
+ 'clipper_enable_irq': 'interrupt', # arch/alpha/kernel/sys_dp264.c,
+ 'count_active_tasks': 'interrupt', # kernel/timer.c,
+ 'csum_ipv6_magic': 'stack', # include/asm-i386/checksum.h, include/asm-alpha/checksum.h,
+ 'del_timer_sync': 'interrupt', # kernel/timer.c, include/linux/timer.h, include/linux/timer.h,
+ 'dev_ifname': 'stack', # net/core/dev.c,
+ 'dev_queue_xmit_nit': 'stack', # net/core/dev.c, include/linux/netdevice.h,
+ 'dev_valid_name': 'stack', # net/core/dev.c,
+ 'do_entDbg': 'interrupt', # arch/alpha/kernel/traps.c,
+ 'do_proc_dointvec_jiffies_conv': 'interrupt', # kernel/sysctl.c,
+ 'down_interruptible': 'interrupt', # arch/alpha/kernel/semaphore.c, include/asm-alpha/semaphore.h, include/asm-i386/semaphore.h, include/asm-alpha/semaphore.h, net/ipv4/netfilter/ip_tables.c, net/ipv6/netfilter/ip6_tables.c,
+ 'drain_array': 'bufmgt', #
+ 'drain_cpu_caches': 'bufmgt', # mm/slab.c,
+ 'dummy_file_fcntl': 'other', # security/dummy.c,
+ 'dummy_sem_semop': 'other', # security/dummy.c,
+ 'emit_log_char': 'other', # kernel/printk.c,
+ 'entDbg': 'interrupt', # arch/alpha/kernel/proto.h,
+ 'entIF': 'interrupt', # arch/alpha/kernel/proto.h,
+ 'eth_header_cache_update': 'stack', # net/ethernet/eth.c, include/linux/etherdevice.h,
+ 'eth_header_parse': 'stack', # net/ethernet/eth.c, include/linux/etherdevice.h,
+ 'ethtool_get_settings': 'stack', # net/core/ethtool.c,
+ 'fifo_open': 'fs', # fs/fifo.c,
+ 'find_trylock_page': 'bufmgt', # mm/filemap.c, include/linux/pagemap.h,
+ 'find_undo': 'bufmgt', # ipc/sem.c,
+ 'find_user': 'bufmgt', # kernel/user.c, include/linux/sched.h,
+ 'flow_cache_cpu_prepare': 'stack', # net/core/flow.c,
+ 'flow_cache_flush_per_cpu': 'stack', # net/core/flow.c,
+ 'flow_cache_flush_tasklet': 'stack', # net/core/flow.c,
+ 'flow_key_compare': 'stack', # net/core/flow.c,
+ 'flush_icache_user_range': 'interrupt', # arch/alpha/kernel/smp.c, include/asm-alpha/cacheflush.h, include/asm-alpha/cacheflush.h, include/asm-i386/cacheflush.h,
+ 'flush_tlb_mm': 'interrupt', # arch/alpha/kernel/smp.c, include/asm-alpha/tlbflush.h, include/asm-i386/tlbflush.h, include/asm-alpha/tlbflush.h, include/asm-i386/tlbflush.h,
+ 'force_page_cache_readahead': 'bufmgt', # mm/readahead.c, include/linux/mm.h,
+ 'free_percpu': 'bufmgt', # mm/slab.c, include/linux/percpu.h, include/linux/percpu.h,
+ 'generic_file_sendfile': 'bufmgt', # mm/filemap.c, include/linux/fs.h,
+ 'get_one_pte_map': 'bufmgt', # mm/mremap.c,
+ 'gunzip': 'other', # lib/inflate.c,
+ 'handle_ipi': 'interrupt', # arch/alpha/kernel/smp.c, arch/alpha/kernel/proto.h,
+ 'input_devices_read': 'driver', # drivers/input/input.c,
+ 'input_link_handle': 'driver', # drivers/input/input.c,
+ 'input_register_device': 'driver', # drivers/input/input.c, include/linux/input.h,
+ 'insb': 'driver', # arch/alpha/kernel/io.c, include/asm-alpha/io.h,
+ 'insl': 'driver', # arch/alpha/kernel/io.c, include/asm-alpha/io.h, drivers/net/smc9194.c, drivers/net/smc9194.c,
+ 'invalidate_bh_lru': 'fs', # fs/buffer.c,
+ 'iommu_arena_alloc': 'interrupt', # arch/alpha/kernel/pci_iommu.c,
+ 'iommu_arena_find_pages': 'interrupt', # arch/alpha/kernel/pci_iommu.c,
+ 'iommu_arena_free': 'interrupt', # arch/alpha/kernel/pci_iommu.c,
+ 'ip_compute_csum': 'stack', # arch/alpha/lib/checksum.c, include/asm-i386/checksum.h, include/asm-alpha/checksum.h,
+ 'ip_getsockopt': 'stack', # net/ipv4/ip_sockglue.c,
+ 'ip_mc_output': 'stack', # net/ipv4/ip_output.c,
+ 'ip_options_compile': 'stack', # net/ipv4/ip_options.c,
+ 'ip_rt_dump': 'stack', # net/ipv4/route.c,
+ 'ipc_checkid': 'stack', # ipc/util.c, ipc/util.h,
+ 'ipc_lock': 'stack', # ipc/util.c, ipc/util.h,
+ 'ipc_unlock': 'stack', # ipc/util.c, ipc/util.h,
+ 'ipcperms': 'stack', # ipc/util.c, ipc/util.h,
+ 'ipi_flush_tlb_page': 'interrupt', # arch/alpha/kernel/smp.c,
+ 'isp1020_intr_handler': 'other', # drivers/scsi/qlogicisp.c, drivers/scsi/qlogicisp.c,
+ 'isp1020_queuecommand': 'other', # drivers/scsi/qlogicisp.c, drivers/scsi/qlogicisp.h,
+ 'kernel_thread': 'interrupt', # include/asm-um/processor-generic.h, include/asm-alpha/processor.h, include/asm-i386/processor.h,
+ 'kmem_find_general_cachep': 'bufmgt', # mm/slab.c,
+ 'kmem_ptr_validate': 'bufmgt', # mm/slab.c,
+ 'llc_mac_hdr_init': 'stack', # net/llc/llc_output.c, net/llc/llc_output.h,
+ 'lock_rename': 'fs', # fs/namei.c, include/linux/namei.h,
+ 'lookup_undo': 'stack', # ipc/sem.c,
+ 'memcpy_tokerneliovec': 'stack', # net/core/iovec.c, include/linux/socket.h,
+ 'migrate_task': 'other', # kernel/sched.c,
+ 'net_ratelimit': 'stack', # net/core/utils.c, include/linux/net.h,
+ 'netlink_release': 'stack', # net/netlink/netlink_dev.c, net/netlink/af_netlink.c,
+ 'nf_log_packet': 'stack', # net/core/netfilter.c, include/linux/netfilter_logging.h, include/linux/netfilter.h,
+ 'nf_queue': 'stack', # net/core/netfilter.c,
+ 'nr_free_zone_pages': 'bufmgt', # mm/page_alloc.c,
+ 'osf_writev': 'driver', # arch/alpha/kernel/osf_sys.c,
+ 'pci_map_sg': 'driver', # arch/alpha/kernel/pci-noop.c, arch/alpha/kernel/pci_iommu.c, include/asm-generic/pci-dma-compat.h, include/asm-alpha/pci.h,
+ 'pci_unmap_sg': 'driver', # arch/alpha/kernel/pci-noop.c, arch/alpha/kernel/pci_iommu.c, include/asm-generic/pci-dma-compat.h, include/asm-alpha/pci.h,
+ 'pcibios_align_resource': 'driver', # arch/alpha/kernel/pci.c, include/linux/pci.h,
+ 'pfifo_fast_requeue': 'stack', # net/sched/sch_generic.c,
+ 'pointer_lock': 'interrupt', # arch/alpha/kernel/smp.c,
+ 'posix_unblock_lock': 'fs', # fs/locks.c, include/linux/fs.h,
+ 'prepare_timeout': 'interrupt', # ipc/mqueue.c,
+ 'printk': 'other', # kernel/printk.c, drivers/md/raid6.h,
+ 'process_mcheck_info': 'interrupt', # arch/alpha/kernel/irq_alpha.c, arch/alpha/kernel/proto.h,
+ 'read_cache_pages': 'bufmgt', # mm/readahead.c, include/linux/pagemap.h,
+ 'register_gifconf': 'stack', # net/core/dev.c, include/linux/netdevice.h,
+ 'rwsem_down_read_failed': 'interrupt', # lib/rwsem.c, include/asm-alpha/rwsem.h,
+ 'search_exception_tables': 'interrupt', # kernel/extable.c, include/linux/module.h,
+ 'security_fixup_ops': 'other', # security/dummy.c, security/security.c,
+ 'send_ipi_message': 'interrupt', # arch/alpha/kernel/smp.c,
+ 'send_sig_info': 'interrupt', # kernel/signal.c, include/linux/sched.h,
+ 'set_fs_altroot': 'fs', # fs/namei.c, include/linux/fs_struct.h,
+ 'sg_classify': 'interrupt', # arch/alpha/kernel/pci_iommu.c,
+ 'sg_fill': 'interrupt', # arch/alpha/kernel/pci_iommu.c,
+ 'sk_common_release': 'stack', # net/core/sock.c,
+ 'sk_stream_wait_connect': 'stack', # net/core/stream.c,
+ 'skb_over_panic': 'stack', # net/core/skbuff.c, include/linux/skbuff.h,
+ 'skb_under_panic': 'stack', # net/core/skbuff.c, include/linux/skbuff.h,
+ 'smp_call_function_on_cpu': 'interrupt', # arch/alpha/kernel/smp.c, include/asm-alpha/smp.h, include/asm-alpha/smp.h,
+ 'sock_def_write_space': 'stack', # net/core/sock.c,
+ 'sock_getsockopt': 'stack', # net/core/sock.c,
+ 'sock_wait_for_wmem': 'stack', # net/core/sock.c,
+ 'srm_dispatch': 'other', #
+ 'srm_fixup': 'other', # include/asm-alpha/console.h,
+ 'stxcpy_aligned': 'bufmgt', #
+ 'sys_capset': 'other', # kernel/capability.c, include/linux/syscalls.h,
+ 'sys_fadvise64': 'bufmgt', # mm/fadvise.c, include/linux/syscalls.h,
+ 'sys_fadvise64_64': 'bufmgt', # mm/fadvise.c, include/linux/syscalls.h,
+ 'sys_newfstat': 'fs', # fs/stat.c, include/linux/syscalls.h,
+ 'sys_semop': 'stack', # ipc/sem.c, include/linux/syscalls.h,
+ 'sys_semtimedop': 'stack', # ipc/sem.c, include/linux/syscalls.h,
+ 'sys_sendfile64': 'fs', # fs/read_write.c, include/linux/syscalls.h,
+ 'sys_socketpair': 'stack', # net/socket.c, include/linux/syscalls.h,
+ 'sys_vhangup': 'fs', # fs/open.c, include/linux/syscalls.h,
+ 'tasklet_hi_action': 'interrupt', # kernel/softirq.c,
+ 'tcp_ack_probe': 'stack', # net/ipv4/tcp_input.c,
+ 'tcp_advertise_mss': 'stack', # net/ipv4/tcp_output.c,
+ 'tcp_enter_loss': 'stack', # net/ipv4/tcp_input.c,
+ 'tcp_fastretrans_alert': 'stack', # net/ipv4/tcp_input.c,
+ 'tcp_ioctl': 'stack', # net/ipv4/tcp.c,
+ 'tcp_process_frto': 'stack', # net/ipv4/tcp_input.c,
+ 'tcp_rcv_synsent_state_process': 'stack', # net/ipv4/tcp_input.c,
+ 'tcp_recv_urg': 'stack', # net/ipv4/tcp.c,
+ 'tcp_reset': 'stack', # net/ipv4/tcp_input.c,
+ 'tcp_retransmit_skb': 'stack', # net/ipv4/tcp_output.c,
+ 'tcp_sacktag_write_queue': 'stack', # net/ipv4/tcp_input.c,
+ 'tcp_time_to_recover': 'stack', # net/ipv4/tcp_input.c,
+ 'tcp_v4_err': 'stack', # net/ipv4/tcp_ipv4.c,
+ 'tcp_v4_get_port': 'stack', # net/ipv4/tcp_ipv4.c,
+ 'tcp_v4_lookup': 'stack', # net/ipv4/tcp_ipv4.c, net/ipv4/tcp_diag.c,
+ 'tcp_v4_reselect_saddr': 'stack', # net/ipv4/tcp_ipv4.c,
+ 'this_rq_lock': 'interrupt', #
+ 'tr_source_route': 'stack', # net/802/tr.c, include/linux/trdevice.h,
+ 'try_atomic_semop': 'stack', # ipc/sem.c,
+ 'tsunami_outw': 'driver', #
+ 'twothirdsMD4Transform': 'other', # drivers/char/random.c,
+ 'unregister_netdevice': 'stack', # net/core/dev.c, include/linux/netdevice.h,
+ 'update_queue': 'stack', # ipc/sem.c,
+ 'vegas_cong_avoid': 'stack', # net/ipv4/tcp_input.c,
+ 'vm_acct_memory': 'bufmgt', # mm/swap.c, include/linux/mman.h,
+ 'vsscanf': 'other', # lib/vsprintf.c, include/linux/kernel.h,
+ 'wait_for_packet': 'stack', # net/core/datagram.c,
+ 'westwood_update_window': 'stack', # net/ipv4/tcp_input.c,
+ 'within_one_quad': 'other', #
}
categories_re = [
#! /usr/bin/env python
+
+# Copyright (c) 2005 The Regents of The University of Michigan
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
import sys
import re
import getopt
+
+# Copyright (c) 2003-2004 The Regents of The University of Michigan
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#Permission is granted to use, copy, create derivative works and
+#redistribute this software and such derivative works for any purpose,
+#so long as the copyright notice above, this grant of permission, and
+#the disclaimer below appear in all copies made; and so long as the
+#name of The University of Michigan is not used in any advertising or
+#publicity pertaining to the use or distribution of this software
+#without specific, written prior authorization.
+#
+#THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
+#UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
+#WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
+#IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
+#MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
+#THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
+#INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+#DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
+#WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
+#ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
import MySQLdb, re, string
def statcmp(a, b):
+
+# Copyright (c) 2003-2004 The Regents of The University of Michigan
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#Permission is granted to use, copy, create derivative works and
+#redistribute this software and such derivative works for any purpose,
+#so long as the copyright notice above, this grant of permission, and
+#the disclaimer below appear in all copies made; and so long as the
+#name of The University of Michigan is not used in any advertising or
+#publicity pertaining to the use or distribution of this software
+#without specific, written prior authorization.
+#
+#THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
+#UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
+#WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
+#IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
+#MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
+#THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
+#INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+#DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
+#WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
+#ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
import MySQLdb
class MyDB(object):
+
+# Copyright (c) 2003-2004 The Regents of The University of Michigan
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#Permission is granted to use, copy, create derivative works and
+#redistribute this software and such derivative works for any purpose,
+#so long as the copyright notice above, this grant of permission, and
+#the disclaimer below appear in all copies made; and so long as the
+#name of The University of Michigan is not used in any advertising or
+#publicity pertaining to the use or distribution of this software
+#without specific, written prior authorization.
+#
+#THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
+#UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
+#WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
+#IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
+#MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
+#THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
+#INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+#DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
+#WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
+#ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
class Value:
def __init__(self, value, precision, percent = False):
self.value = value
+
+# Copyright (c) 2003-2004 The Regents of The University of Michigan
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#Permission is granted to use, copy, create derivative works and
+#redistribute this software and such derivative works for any purpose,
+#so long as the copyright notice above, this grant of permission, and
+#the disclaimer below appear in all copies made; and so long as the
+#name of The University of Michigan is not used in any advertising or
+#publicity pertaining to the use or distribution of this software
+#without specific, written prior authorization.
+#
+#THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
+#UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
+#WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
+#IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
+#MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
+#THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
+#INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+#DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
+#WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
+#ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
from __future__ import division
import operator, re, types
+
+# Copyright (c) 2003-2004 The Regents of The University of Michigan
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#Permission is granted to use, copy, create derivative works and
+#redistribute this software and such derivative works for any purpose,
+#so long as the copyright notice above, this grant of permission, and
+#the disclaimer below appear in all copies made; and so long as the
+#name of The University of Michigan is not used in any advertising or
+#publicity pertaining to the use or distribution of this software
+#without specific, written prior authorization.
+#
+#THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
+#UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
+#WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
+#IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
+#MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
+#THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
+#INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+#DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
+#WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
+#ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
all = False
descriptions = False
#!/usr/bin/env python
+
+# Copyright (c) 2003-2004 The Regents of The University of Michigan
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#Permission is granted to use, copy, create derivative works and
+#redistribute this software and such derivative works for any purpose,
+#so long as the copyright notice above, this grant of permission, and
+#the disclaimer below appear in all copies made; and so long as the
+#name of The University of Michigan is not used in any advertising or
+#publicity pertaining to the use or distribution of this software
+#without specific, written prior authorization.
+#
+#THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
+#UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND WITHOUT
+#WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER EXPRESS OR
+#IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
+#MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE REGENTS OF
+#THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE FOR ANY DAMAGES,
+#INCLUDING DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+#DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR IN CONNECTION
+#WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS HEREAFTER
+#ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
from __future__ import division
import re, sys, math