Annotation of OSKit-Mach/kern/counters.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Mach Operating System
        !             3:  * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
        !             4:  * All Rights Reserved.
        !             5:  *
        !             6:  * Permission to use, copy, modify and distribute this software and its
        !             7:  * documentation is hereby granted, provided that both the copyright
        !             8:  * notice and this permission notice appear in all copies of the
        !             9:  * software, derivative works or modified versions, and any portions
        !            10:  * thereof, and that both notices appear in supporting documentation.
        !            11:  *
        !            12:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
        !            13:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
        !            14:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
        !            15:  *
        !            16:  * Carnegie Mellon requests users of this software to return to
        !            17:  *
        !            18:  *  Software Distribution Coordinator  or  [email protected]
        !            19:  *  School of Computer Science
        !            20:  *  Carnegie Mellon University
        !            21:  *  Pittsburgh PA 15213-3890
        !            22:  *
        !            23:  * any improvements or extensions that they make and grant Carnegie Mellon
        !            24:  * the rights to redistribute these changes.
        !            25:  */
        !            26: 
        !            27: #ifndef        _KERN_COUNTERS_
        !            28: #define        _KERN_COUNTERS_
        !            29: 
        !            30: #include <mach_counters.h>
        !            31: 
        !            32: /*
        !            33:  *     We can count various interesting events and paths.
        !            34:  *
        !            35:  *     Use counter() to change the counters, eg:
        !            36:  *             counter(c_idle_thread_block++);
        !            37:  *     Use counter_always() for non-conditional counters.
        !            38:  */
        !            39: 
        !            40: #define counter_always(code)   code
        !            41: 
        !            42: #if    MACH_COUNTERS
        !            43: 
        !            44: #define counter(code)          counter_always(code)
        !            45: 
        !            46: #else  /* MACH_COUNTERS */
        !            47: 
        !            48: #define counter(code)
        !            49: 
        !            50: #endif /* MACH_COUNTERS */
        !            51: 
        !            52: /*
        !            53:  *     We define the counters with individual integers,
        !            54:  *     instead of a big structure, so that ddb
        !            55:  *     will know the addresses of the counters.
        !            56:  */
        !            57: 
        !            58: typedef unsigned int mach_counter_t;
        !            59: 
        !            60: extern mach_counter_t c_thread_invoke_hits;
        !            61: extern mach_counter_t c_thread_invoke_misses;
        !            62: extern mach_counter_t c_thread_invoke_csw;
        !            63: extern mach_counter_t c_thread_handoff_hits;
        !            64: extern mach_counter_t c_thread_handoff_misses;
        !            65: 
        !            66: #if    MACH_COUNTERS
        !            67: extern mach_counter_t c_threads_current;
        !            68: extern mach_counter_t c_threads_max;
        !            69: extern mach_counter_t c_threads_min;
        !            70: extern mach_counter_t c_threads_total;
        !            71: extern mach_counter_t c_stacks_current;
        !            72: extern mach_counter_t c_stacks_max;
        !            73: extern mach_counter_t c_stacks_min;
        !            74: extern mach_counter_t c_stacks_total;
        !            75: extern mach_counter_t c_clock_ticks;
        !            76: extern mach_counter_t c_ipc_mqueue_send_block;
        !            77: extern mach_counter_t c_ipc_mqueue_receive_block_user;
        !            78: extern mach_counter_t c_ipc_mqueue_receive_block_kernel;
        !            79: extern mach_counter_t c_mach_msg_trap_block_fast;
        !            80: extern mach_counter_t c_mach_msg_trap_block_slow;
        !            81: extern mach_counter_t c_mach_msg_trap_block_exc;
        !            82: extern mach_counter_t c_exception_raise_block;
        !            83: extern mach_counter_t c_swtch_block;
        !            84: extern mach_counter_t c_swtch_pri_block;
        !            85: extern mach_counter_t c_thread_switch_block;
        !            86: extern mach_counter_t c_thread_switch_handoff;
        !            87: extern mach_counter_t c_ast_taken_block;
        !            88: extern mach_counter_t c_thread_halt_self_block;
        !            89: extern mach_counter_t c_vm_fault_page_block_busy_user;
        !            90: extern mach_counter_t c_vm_fault_page_block_busy_kernel;
        !            91: extern mach_counter_t c_vm_fault_page_block_backoff_user;
        !            92: extern mach_counter_t c_vm_fault_page_block_backoff_kernel;
        !            93: extern mach_counter_t c_vm_page_wait_block_user;
        !            94: extern mach_counter_t c_vm_page_wait_block_kernel;
        !            95: extern mach_counter_t c_vm_pageout_block;
        !            96: extern mach_counter_t c_vm_pageout_scan_block;
        !            97: extern mach_counter_t c_idle_thread_block;
        !            98: extern mach_counter_t c_idle_thread_handoff;
        !            99: extern mach_counter_t c_sched_thread_block;
        !           100: extern mach_counter_t c_io_done_thread_block;
        !           101: extern mach_counter_t c_net_thread_block;
        !           102: extern mach_counter_t c_reaper_thread_block;
        !           103: extern mach_counter_t c_swapin_thread_block;
        !           104: extern mach_counter_t c_action_thread_block;
        !           105: #endif /* MACH_COUNTERS */
        !           106: 
        !           107: #endif /* _KERN_COUNTERS_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.