Leaked source code of windows server 2003
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.

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