From 5070f27c694571eb238bb2f98d69cf06d551994c Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Sun, 5 Jun 2005 04:08:05 -0400 Subject: added copyright kern/linux/sched.hh: kern/linux/thread_info.hh: got rid of everything but exactly what we needed util/categories.py: newest version from one of my repositories --HG-- extra : convert_revision : c4328e5938d421d60493c0da07022bfa9e92c404 --- util/categories.py | 182 +++++++++++++++++++++++++++++++++++++++++++++++++- util/oprofile-top.py | 27 ++++++++ util/stats/db.py | 46 +++++++++++++ util/stats/dbinit.py | 46 +++++++++++++ util/stats/display.py | 46 +++++++++++++ util/stats/info.py | 46 +++++++++++++ util/stats/print.py | 46 +++++++++++++ util/stats/stats.py | 46 +++++++++++++ 8 files changed, 484 insertions(+), 1 deletion(-) (limited to 'util') diff --git a/util/categories.py b/util/categories.py index 509e5cefd..877e548ed 100644 --- a/util/categories.py +++ b/util/categories.py @@ -1621,7 +1621,187 @@ categories = { '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 = [ diff --git a/util/oprofile-top.py b/util/oprofile-top.py index 5ada86c2f..eed5449c3 100755 --- a/util/oprofile-top.py +++ b/util/oprofile-top.py @@ -1,4 +1,31 @@ #! /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 diff --git a/util/stats/db.py b/util/stats/db.py index ed5d10bc2..ea6eb552f 100644 --- a/util/stats/db.py +++ b/util/stats/db.py @@ -1,3 +1,49 @@ + +# 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): diff --git a/util/stats/dbinit.py b/util/stats/dbinit.py index 686f55c98..b7b58c8d0 100644 --- a/util/stats/dbinit.py +++ b/util/stats/dbinit.py @@ -1,3 +1,49 @@ + +# 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): diff --git a/util/stats/display.py b/util/stats/display.py index 4c17d4427..cf622093e 100644 --- a/util/stats/display.py +++ b/util/stats/display.py @@ -1,3 +1,49 @@ + +# 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 diff --git a/util/stats/info.py b/util/stats/info.py index 3f6a8dbc3..b7f123193 100644 --- a/util/stats/info.py +++ b/util/stats/info.py @@ -1,3 +1,49 @@ + +# 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 diff --git a/util/stats/print.py b/util/stats/print.py index 1ed50eef0..0e570c0e4 100644 --- a/util/stats/print.py +++ b/util/stats/print.py @@ -1,3 +1,49 @@ + +# 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 diff --git a/util/stats/stats.py b/util/stats/stats.py index 5f5b6b86e..ca44b2199 100755 --- a/util/stats/stats.py +++ b/util/stats/stats.py @@ -1,4 +1,50 @@ #!/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 -- cgit v1.2.3