|
|
1.1.1.2 root 1: /*
1.1 root 2: * Mach Operating System
3: * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
4: * All Rights Reserved.
1.1.1.2 root 5: *
1.1 root 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.
1.1.1.2 root 11: *
1.1 root 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.
1.1.1.2 root 15: *
1.1 root 16: * Carnegie Mellon requests users of this software to return to
1.1.1.2 root 17: *
1.1 root 18: * Software Distribution Coordinator or [email protected]
19: * School of Computer Science
20: * Carnegie Mellon University
21: * Pittsburgh PA 15213-3890
1.1.1.2 root 22: *
1.1 root 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: /*
31: * We can count various interesting events and paths.
32: *
33: * Use counter() to change the counters, eg:
34: * counter(c_idle_thread_block++);
35: * Use counter_always() for non-conditional counters.
36: */
37:
38: #define counter_always(code) code
39:
40: #if MACH_COUNTERS
41:
42: #define counter(code) counter_always(code)
43:
1.1.1.2 root 44: #else /* MACH_COUNTERS */
1.1 root 45:
46: #define counter(code)
47:
1.1.1.2 root 48: #endif /* MACH_COUNTERS */
1.1 root 49:
50: /*
51: * We define the counters with individual integers,
52: * instead of a big structure, so that ddb
53: * will know the addresses of the counters.
54: */
55:
56: typedef unsigned int mach_counter_t;
57:
58: extern mach_counter_t c_thread_invoke_hits;
59: extern mach_counter_t c_thread_invoke_misses;
60: extern mach_counter_t c_thread_invoke_csw;
61: extern mach_counter_t c_thread_handoff_hits;
62: extern mach_counter_t c_thread_handoff_misses;
63:
64: #if MACH_COUNTERS
65: extern mach_counter_t c_threads_current;
66: extern mach_counter_t c_threads_max;
67: extern mach_counter_t c_threads_min;
68: extern mach_counter_t c_threads_total;
69: extern mach_counter_t c_stacks_current;
70: extern mach_counter_t c_stacks_max;
71: extern mach_counter_t c_stacks_min;
72: extern mach_counter_t c_stacks_total;
73: extern mach_counter_t c_clock_ticks;
74: extern mach_counter_t c_ipc_mqueue_send_block;
75: extern mach_counter_t c_ipc_mqueue_receive_block_user;
76: extern mach_counter_t c_ipc_mqueue_receive_block_kernel;
77: extern mach_counter_t c_mach_msg_trap_block_fast;
78: extern mach_counter_t c_mach_msg_trap_block_slow;
79: extern mach_counter_t c_mach_msg_trap_block_exc;
80: extern mach_counter_t c_exception_raise_block;
81: extern mach_counter_t c_swtch_block;
82: extern mach_counter_t c_swtch_pri_block;
83: extern mach_counter_t c_thread_switch_block;
84: extern mach_counter_t c_thread_switch_handoff;
85: extern mach_counter_t c_ast_taken_block;
86: extern mach_counter_t c_thread_halt_self_block;
87: extern mach_counter_t c_vm_fault_page_block_busy_user;
88: extern mach_counter_t c_vm_fault_page_block_busy_kernel;
89: extern mach_counter_t c_vm_fault_page_block_backoff_user;
90: extern mach_counter_t c_vm_fault_page_block_backoff_kernel;
91: extern mach_counter_t c_vm_page_wait_block_user;
92: extern mach_counter_t c_vm_page_wait_block_kernel;
93: extern mach_counter_t c_vm_pageout_block;
94: extern mach_counter_t c_vm_pageout_scan_block;
95: extern mach_counter_t c_idle_thread_block;
96: extern mach_counter_t c_idle_thread_handoff;
97: extern mach_counter_t c_sched_thread_block;
98: extern mach_counter_t c_io_done_thread_block;
99: extern mach_counter_t c_net_thread_block;
100: extern mach_counter_t c_reaper_thread_block;
101: extern mach_counter_t c_swapin_thread_block;
102: extern mach_counter_t c_action_thread_block;
1.1.1.2 root 103: #endif /* MACH_COUNTERS */
1.1 root 104:
1.1.1.2 root 105: #endif /* _KERN_COUNTERS_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.