Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

260 lines
6.0 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. datasys.c
  5. Abstract:
  6. a file containing the constant data structures used by the Performance
  7. Monitor data for the Operating System performance data objects
  8. This file contains a set of constant data structures which are
  9. currently defined for the Signal Generator Perf DLL.
  10. Created:
  11. Bob Watson 20-Oct-1996
  12. Revision History:
  13. None.
  14. --*/
  15. //
  16. // Include Files
  17. //
  18. #include <windows.h>
  19. #include <winperf.h>
  20. #include <ntprfctr.h>
  21. #include <perfutil.h>
  22. #include "datasys.h"
  23. // dummy variable for field sizing.
  24. static SYSTEM_COUNTER_DATA scd;
  25. //
  26. // Constant structure initializations
  27. // defined in datasys.h
  28. //
  29. SYSTEM_DATA_DEFINITION SystemDataDefinition = {
  30. { sizeof(SYSTEM_DATA_DEFINITION) + sizeof(SYSTEM_COUNTER_DATA),
  31. sizeof(SYSTEM_DATA_DEFINITION),
  32. sizeof(PERF_OBJECT_TYPE),
  33. SYSTEM_OBJECT_TITLE_INDEX,
  34. 0,
  35. 3,
  36. 0,
  37. PERF_DETAIL_NOVICE,
  38. (sizeof(SYSTEM_DATA_DEFINITION)-sizeof(PERF_OBJECT_TYPE))/
  39. sizeof(PERF_COUNTER_DEFINITION),
  40. 8, // Default: TOTAL_PROCESSOR_TIME
  41. -1,
  42. UNICODE_CODE_PAGE,
  43. {0L,0L},
  44. {10000000L,0L}
  45. },
  46. { sizeof(PERF_COUNTER_DEFINITION),
  47. 10,
  48. 0,
  49. 11,
  50. 0,
  51. 0,
  52. PERF_DETAIL_NOVICE,
  53. PERF_COUNTER_COUNTER,
  54. sizeof(scd.ReadOperations),
  55. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->ReadOperations
  56. },
  57. { sizeof(PERF_COUNTER_DEFINITION),
  58. 12,
  59. 0,
  60. 13,
  61. 0,
  62. 0,
  63. PERF_DETAIL_NOVICE,
  64. PERF_COUNTER_COUNTER,
  65. sizeof(scd.WriteOperations),
  66. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->WriteOperations
  67. },
  68. { sizeof(PERF_COUNTER_DEFINITION),
  69. 14,
  70. 0,
  71. 15,
  72. 0,
  73. 0,
  74. PERF_DETAIL_ADVANCED,
  75. PERF_COUNTER_COUNTER,
  76. sizeof(scd.OtherIOOperations),
  77. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->OtherIOOperations
  78. },
  79. { sizeof(PERF_COUNTER_DEFINITION),
  80. 16,
  81. 0,
  82. 17,
  83. 0,
  84. -4,
  85. PERF_DETAIL_EXPERT,
  86. PERF_COUNTER_BULK_COUNT,
  87. sizeof(scd.ReadBytes),
  88. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->ReadBytes
  89. },
  90. { sizeof(PERF_COUNTER_DEFINITION),
  91. 18,
  92. 0,
  93. 19,
  94. 0,
  95. -4,
  96. PERF_DETAIL_EXPERT,
  97. PERF_COUNTER_BULK_COUNT,
  98. sizeof(scd.WriteBytes),
  99. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->WriteBytes
  100. },
  101. { sizeof(PERF_COUNTER_DEFINITION),
  102. 20,
  103. 0,
  104. 21,
  105. 0,
  106. -3,
  107. PERF_DETAIL_WIZARD,
  108. PERF_COUNTER_BULK_COUNT,
  109. sizeof(scd.OtherIOBytes),
  110. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->OtherIOBytes
  111. },
  112. { sizeof(PERF_COUNTER_DEFINITION),
  113. 146,
  114. 0,
  115. 147,
  116. 0,
  117. -2,
  118. PERF_DETAIL_ADVANCED,
  119. PERF_COUNTER_COUNTER,
  120. sizeof(scd.ContextSwitches),
  121. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->ContextSwitches
  122. },
  123. { sizeof(PERF_COUNTER_DEFINITION),
  124. 150,
  125. 0,
  126. 151,
  127. 0,
  128. -1,
  129. PERF_DETAIL_ADVANCED,
  130. PERF_COUNTER_COUNTER,
  131. sizeof(scd.SystemCalls),
  132. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->SystemCalls
  133. },
  134. { sizeof(PERF_COUNTER_DEFINITION),
  135. 406,
  136. 0,
  137. 407,
  138. 0,
  139. 0,
  140. PERF_DETAIL_NOVICE,
  141. PERF_COUNTER_COUNTER,
  142. sizeof(scd.TotalReadWrites),
  143. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->TotalReadWrites
  144. },
  145. { sizeof(PERF_COUNTER_DEFINITION),
  146. 674,
  147. 0,
  148. 675,
  149. 0,
  150. -5,
  151. PERF_DETAIL_NOVICE,
  152. PERF_ELAPSED_TIME,
  153. sizeof(scd.SystemElapsedTime),
  154. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->SystemElapsedTime
  155. },
  156. { sizeof(PERF_COUNTER_DEFINITION),
  157. 44,
  158. 0,
  159. 45,
  160. 0,
  161. 1,
  162. PERF_DETAIL_WIZARD,
  163. PERF_COUNTER_RAWCOUNT,
  164. sizeof(scd.ProcessorQueueLength),
  165. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->ProcessorQueueLength
  166. },
  167. { sizeof(PERF_COUNTER_DEFINITION),
  168. 248,
  169. 0,
  170. 249,
  171. 0,
  172. 1,
  173. PERF_DETAIL_WIZARD,
  174. PERF_COUNTER_RAWCOUNT,
  175. sizeof(scd.ProcessCount),
  176. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->ProcessCount
  177. },
  178. { sizeof(PERF_COUNTER_DEFINITION),
  179. 250,
  180. 0,
  181. 251,
  182. 0,
  183. 1,
  184. PERF_DETAIL_WIZARD,
  185. PERF_COUNTER_RAWCOUNT,
  186. sizeof(scd.ThreadCount),
  187. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->ThreadCount
  188. },
  189. { sizeof(PERF_COUNTER_DEFINITION),
  190. 686,
  191. 0,
  192. 687,
  193. 0,
  194. 0,
  195. PERF_DETAIL_WIZARD,
  196. PERF_COUNTER_COUNTER,
  197. sizeof(scd.AlignmentFixups),
  198. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->AlignmentFixups
  199. },
  200. { sizeof(PERF_COUNTER_DEFINITION),
  201. 688,
  202. 0,
  203. 689,
  204. 0,
  205. 0,
  206. PERF_DETAIL_WIZARD,
  207. PERF_COUNTER_COUNTER,
  208. sizeof(scd.ExceptionDispatches),
  209. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->ExceptionDispatches
  210. },
  211. { sizeof(PERF_COUNTER_DEFINITION),
  212. 690,
  213. 0,
  214. 691,
  215. 0,
  216. 0,
  217. PERF_DETAIL_WIZARD,
  218. PERF_COUNTER_COUNTER,
  219. sizeof(scd.FloatingPointEmulations),
  220. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->FloatingPointEmulations
  221. },
  222. { sizeof(PERF_COUNTER_DEFINITION),
  223. 1350,
  224. 0,
  225. 1351,
  226. 0,
  227. 0,
  228. PERF_DETAIL_ADVANCED,
  229. PERF_RAW_FRACTION,
  230. sizeof(scd.RegistryQuotaUsed),
  231. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->RegistryQuotaUsed
  232. },
  233. { sizeof(PERF_COUNTER_DEFINITION),
  234. 1350,
  235. 0,
  236. 1351,
  237. 0,
  238. 0,
  239. PERF_DETAIL_ADVANCED,
  240. PERF_RAW_BASE,
  241. sizeof(scd.RegistryQuotaAllowed),
  242. (DWORD)(ULONG_PTR)&((PSYSTEM_COUNTER_DATA)0)->RegistryQuotaAllowed
  243. }
  244. };
  245.