FreeBSD/Linux Kernel Cross Reference
sys/mach/task_info.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1993-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 Software.Distribution@CS.CMU.EDU
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 * HISTORY
28 * $Log: task_info.h,v $
29 * Revision 2.6 93/01/21 12:23:23 danner
30 * Introduced flavors for task_ras_control
31 * [93/01/19 16:35:26 bershad]
32 *
33 * Revision 2.5 93/01/14 17:47:48 danner
34 * Standardized include symbol name.
35 * [92/06/10 pds]
36 * 64bit cleanup.
37 * [92/12/01 af]
38 *
39 * Revision 2.4 91/05/14 17:00:41 mrt
40 * Correcting copyright
41 *
42 * Revision 2.3 91/02/05 17:36:25 mrt
43 * Changed to new Mach copyright
44 * [91/02/01 17:21:17 mrt]
45 *
46 * Revision 2.2 90/05/03 15:48:36 dbg
47 * Added TASK_THREAD_TIMES_INFO flavor.
48 * [90/04/03 dbg]
49 *
50 * Revision 2.1 89/08/03 16:04:49 rwd
51 * Created.
52 *
53 * Revision 2.3 89/02/25 18:41:06 gm0w
54 * Changes for cleanup.
55 *
56 * 15-Jan-88 David Golub (dbg) at Carnegie-Mellon University
57 * Created, based on old task_statistics.
58 *
59 */
60 /*
61 * Machine-independent task information structures and definitions.
62 *
63 * The definitions in this file are exported to the user. The kernel
64 * will translate its internal data structures to these structures
65 * as appropriate.
66 *
67 */
68
69 #ifndef _MACH_TASK_INFO_H_
70 #define _MACH_TASK_INFO_H_
71
72 #include <mach/machine/vm_types.h>
73 #include <mach/time_value.h>
74
75 /*
76 * Generic information structure to allow for expansion.
77 */
78 typedef integer_t *task_info_t; /* varying array of int */
79
80 #define TASK_INFO_MAX (1024) /* maximum array size */
81 typedef integer_t task_info_data_t[TASK_INFO_MAX];
82
83 /*
84 * Currently defined information structures.
85 */
86 #define TASK_BASIC_INFO 1 /* basic information */
87
88 struct task_basic_info {
89 integer_t suspend_count; /* suspend count for task */
90 integer_t base_priority; /* base scheduling priority */
91 vm_size_t virtual_size; /* number of virtual pages */
92 vm_size_t resident_size; /* number of resident pages */
93 time_value_t user_time; /* total user run time for
94 terminated threads */
95 time_value_t system_time; /* total system run time for
96 terminated threads */
97 };
98
99 typedef struct task_basic_info task_basic_info_data_t;
100 typedef struct task_basic_info *task_basic_info_t;
101 #define TASK_BASIC_INFO_COUNT \
102 (sizeof(task_basic_info_data_t) / sizeof(natural_t))
103
104
105 #define TASK_EVENTS_INFO 2 /* various event counts */
106
107 struct task_events_info {
108 natural_t faults; /* number of page faults */
109 natural_t zero_fills; /* number of zero fill pages */
110 natural_t reactivations; /* number of reactivated pages */
111 natural_t pageins; /* number of actual pageins */
112 natural_t cow_faults; /* number of copy-on-write faults */
113 natural_t messages_sent; /* number of messages sent */
114 natural_t messages_received; /* number of messages received */
115 };
116 typedef struct task_events_info task_events_info_data_t;
117 typedef struct task_events_info *task_events_info_t;
118 #define TASK_EVENTS_INFO_COUNT \
119 (sizeof(task_events_info_data_t) / sizeof(natural_t))
120
121 #define TASK_THREAD_TIMES_INFO 3 /* total times for live threads -
122 only accurate if suspended */
123
124 struct task_thread_times_info {
125 time_value_t user_time; /* total user run time for
126 live threads */
127 time_value_t system_time; /* total system run time for
128 live threads */
129 };
130
131 typedef struct task_thread_times_info task_thread_times_info_data_t;
132 typedef struct task_thread_times_info *task_thread_times_info_t;
133 #define TASK_THREAD_TIMES_INFO_COUNT \
134 (sizeof(task_thread_times_info_data_t) / sizeof(natural_t))
135
136 /*
137 * Flavor definitions for task_ras_control
138 */
139 #define TASK_RAS_CONTROL_PURGE_ALL 0
140 #define TASK_RAS_CONTROL_PURGE_ONE 1
141 #define TASK_RAS_CONTROL_PURGE_ALL_AND_INSTALL_ONE 2
142 #define TASK_RAS_CONTROL_INSTALL_ONE 3
143
144 #endif /* _MACH_TASK_INFO_H_ */
145
Cache object: 93499802711e8e79f1c87956bc71c1c7
|