4 IDL structures for perfcount code
8 pointer_default(unique)
12 const int PERF_NO_INSTANCES
= -1;
13 const int PERF_NO_UNIQUE_ID
= -1;
15 /* These determine the data size */
16 const int PERF_SIZE_DWORD
= 0x00000000;
17 const int PERF_SIZE_LARGE
= 0x00000100;
18 const int PERF_SIZE_ZERO
= 0x00000200;
19 const int PERF_SIZE_VARIABLE_LEN
= 0x00000300;
21 /* These determine the usage of the counter */
22 const int PERF_TYPE_NUMBER
= 0x00000000;
23 const int PERF_TYPE_COUNTER
= 0x00000400;
24 const int PERF_TYPE_TEXT
= 0x00000800;
25 const int PERF_TYPE_ZERO
= 0x00000C00;
27 /* If PERF_TYPE_NUMBER was selected, these provide display information */
28 const int PERF_NUMBER_HEX
= 0x00000000;
29 const int PERF_NUMBER_DECIMAL
= 0x00010000;
30 const int PERF_NUMBER_DEC_1000
= 0x00020000;
32 /* If PERF_TYPE_COUNTER was selected, these provide display information */
33 const int PERF_COUNTER_VALUE
= 0x00000000;
34 const int PERF_COUNTER_RATE
= 0x00010000;
35 const int PERF_COUNTER_FRACTION
= 0x00020000;
36 const int PERF_COUNTER_BASE
= 0x00030000;
37 const int PERF_COUNTER_ELAPSED
= 0x00040000;
38 const int PERF_COUNTER_QUEUELEN
= 0x00050000;
39 const int PERF_COUNTER_HISTOGRAM
= 0x00060000;
40 const int PERF_COUNTER_PRECISION
= 0x00070000;
42 /* If PERF_TYPE_TEXT was selected, these provide display information */
43 const int PERF_TEXT_UNICODE
= 0x00000000;
44 const int PERF_TEXT_ASCII
= 0x00010000;
46 /* These provide information for which tick count to use when computing elapsed interval */
47 const int PERF_TIMER_TICK
= 0x00000000;
48 const int PERF_TIMER_100NS
= 0x00100000;
49 const int PERF_OBJECT_TIMER
= 0x00200000;
51 /* These affect how the data is manipulated prior to being displayed */
52 const int PERF_DELTA_COUNTER
= 0x00400000;
53 const int PERF_DELTA_BASE
= 0x00800000;
54 const int PERF_INVERSE_COUNTER
= 0x01000000;
55 const int PERF_MULTI_COUNTER
= 0x02000000;
57 /* These determine if any text gets added when the value is displayed */
58 const int PERF_DISPLAY_NO_SUFFIX
= 0x00000000;
59 const int PERF_DISPLAY_PER_SEC
= 0x10000000;
60 const int PERF_DISPLAY_PERCENT
= 0x20000000;
61 const int PERF_DISPLAY_SECONDS
= 0x30000000;
62 const int PERF_DISPLAY_NOSHOW
= 0x40000000;
64 /* These determine the DetailLevel of the counter */
65 const int PERF_DETAIL_NOVICE
= 100;
66 const int PERF_DETAIL_ADVANCED
= 200;
67 const int PERF_DETAIL_EXPERT
= 300;
68 const int PERF_DETAIL_WIZARD
= 400;
81 typedef [public] struct {
82 /* sizeof(PERF_COUNTER_DEFINITION) */
84 uint32 CounterNameTitleIndex
;
85 uint32 CounterNameTitlePointer
;
86 uint32 CounterHelpTitleIndex
;
87 uint32 CounterHelpTitlePointer
;
93 } PERF_COUNTER_DEFINITION
;
95 typedef [public] struct {
96 /* Total size of the data block, including all data plus this header */
98 uint8 data
[ByteLength
];
101 typedef [public] struct {
102 /* Total size of the instance definition, including the length of the terminated Name string */
104 uint32 ParentObjectTitleIndex
;
105 uint32 ParentObjectTitlePointer
;
107 /* From the start of the PERF_INSTANCE_DEFINITION, the byte offset to the start of the Name string */
110 /* Unicode string containing the name for the instance */
112 PERF_COUNTER_BLOCK counter_data
;
113 } PERF_INSTANCE_DEFINITION
;
115 typedef [public] struct {
116 /* Total size of the object block, including all PERF_INSTANCE_DEFINITIONs,
117 PERF_COUNTER_DEFINITIONs and PERF_COUNTER_BLOCKs in bytes */
118 uint32 TotalByteLength
;
119 /* Size of this PERF_OBJECT_TYPE plus all PERF_COUNTER_DEFINITIONs in bytes */
120 uint32 DefinitionLength
;
121 /* Size of this PERF_OBJECT_TYPE */
123 uint32 ObjectNameTitleIndex
;
124 uint32 ObjectNameTitlePointer
;
125 uint32 ObjectHelpTitleIndex
;
126 uint32 ObjectHelpTitlePointer
;
129 uint32 DefaultCounter
;
134 PERF_COUNTER_DEFINITION counters
[NumCounters
];
135 PERF_INSTANCE_DEFINITION instances
[NumInstances
];
136 PERF_COUNTER_BLOCK counter_data
;
139 /* PerfCounter Inner Buffer structs */
140 typedef [public] struct {
141 /* hardcoded to read "P.E.R.F" */
144 /* both currently hardcoded to 1 */
147 /* bytes of PERF_OBJECT_TYPE data, does NOT include the PERF_DATA_BLOCK */
148 uint32 TotalByteLength
;
149 /* size of PERF_DATA_BLOCK including the uint8 *data */
151 /* number of PERF_OBJECT_TYPE structures encoded */
152 uint32 NumObjectTypes
;
153 uint32 DefaultObject
;
154 SYSTEMTIME SystemTime
;
155 /* This will guarantee that we're on a 64-bit boundary before we encode
156 PerfTime, and having it there will make my offset math much easier. */
158 /* Now when I'm marshalling this, I'll need to call prs_align_uint64()
159 before I start encoding the uint64 structs */
160 /* clock rate * seconds uptime */
162 /* The clock rate of the CPU */
164 /* used for high-res timers -- for now PerfTime * 10e7 */
165 hyper PerfTime100nSec
;
166 uint32 SystemNameLength
;
167 uint32 SystemNameOffset
;
168 /* The SystemName, in unicode, terminated */
170 PERF_OBJECT_TYPE objects
[NumObjectTypes
];