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.

408 lines
10 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. datacach.c
  5. Abstract:
  6. a file containing the constant data structures used by the Performance
  7. Monitor data for the Cache performance data objects
  8. Created:
  9. Bob Watson 22-Oct-1996
  10. Revision History:
  11. None.
  12. --*/
  13. //
  14. // Include Files
  15. //
  16. #include <windows.h>
  17. #include <winperf.h>
  18. #include <ntprfctr.h>
  19. #include <perfutil.h>
  20. #include "datacach.h"
  21. //
  22. // Constant structure initializations
  23. // defined in datacach.h
  24. //
  25. CACHE_DATA_DEFINITION CacheDataDefinition = {
  26. { sizeof(CACHE_DATA_DEFINITION) + sizeof (CACHE_COUNTER_DATA),
  27. sizeof(CACHE_DATA_DEFINITION),
  28. sizeof(PERF_OBJECT_TYPE),
  29. CACHE_OBJECT_TITLE_INDEX,
  30. 0,
  31. 87,
  32. 0,
  33. PERF_DETAIL_ADVANCED,
  34. (sizeof(CACHE_DATA_DEFINITION)-sizeof(PERF_OBJECT_TYPE))/
  35. sizeof(PERF_COUNTER_DEFINITION),
  36. 3,
  37. -1,
  38. UNICODE_CODE_PAGE,
  39. {0L,0L},
  40. {0L,0L}
  41. },
  42. { sizeof(PERF_COUNTER_DEFINITION),
  43. 88,
  44. 0,
  45. 89,
  46. 0,
  47. 0,
  48. PERF_DETAIL_EXPERT,
  49. PERF_COUNTER_COUNTER,
  50. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, DataMaps),
  51. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->DataMaps
  52. },
  53. { sizeof(PERF_COUNTER_DEFINITION),
  54. 90,
  55. 0,
  56. 91,
  57. 0,
  58. 0,
  59. PERF_DETAIL_WIZARD,
  60. PERF_COUNTER_COUNTER,
  61. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, SyncDataMaps),
  62. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->SyncDataMaps
  63. },
  64. { sizeof(PERF_COUNTER_DEFINITION),
  65. 92,
  66. 0,
  67. 93,
  68. 0,
  69. 0,
  70. PERF_DETAIL_WIZARD,
  71. PERF_COUNTER_COUNTER,
  72. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, AsyncDataMaps),
  73. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->AsyncDataMaps
  74. },
  75. { sizeof(PERF_COUNTER_DEFINITION),
  76. 94,
  77. 0,
  78. 95,
  79. 0,
  80. 0,
  81. PERF_DETAIL_WIZARD,
  82. PERF_SAMPLE_FRACTION,
  83. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, DataMapHits),
  84. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->DataMapHits
  85. },
  86. { sizeof(PERF_COUNTER_DEFINITION),
  87. 94,
  88. 0,
  89. 95,
  90. 0,
  91. 0,
  92. PERF_DETAIL_WIZARD,
  93. PERF_SAMPLE_BASE,
  94. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, DataMapHitsBase),
  95. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->DataMapHitsBase
  96. },
  97. { sizeof(PERF_COUNTER_DEFINITION),
  98. 96,
  99. 0,
  100. 97,
  101. 0,
  102. 0,
  103. PERF_DETAIL_WIZARD,
  104. PERF_SAMPLE_FRACTION,
  105. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, DataMapPins),
  106. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->DataMapPins
  107. },
  108. { sizeof(PERF_COUNTER_DEFINITION),
  109. 96,
  110. 0,
  111. 97,
  112. 0,
  113. 0,
  114. PERF_DETAIL_WIZARD,
  115. PERF_SAMPLE_BASE,
  116. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, DataMapPinsBase),
  117. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->DataMapPinsBase
  118. },
  119. { sizeof(PERF_COUNTER_DEFINITION),
  120. 98,
  121. 0,
  122. 99,
  123. 0,
  124. 0,
  125. PERF_DETAIL_EXPERT,
  126. PERF_COUNTER_COUNTER,
  127. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, PinReads),
  128. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->PinReads
  129. },
  130. { sizeof(PERF_COUNTER_DEFINITION),
  131. 100,
  132. 0,
  133. 101,
  134. 0,
  135. 0,
  136. PERF_DETAIL_WIZARD,
  137. PERF_COUNTER_COUNTER,
  138. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, SyncPinReads),
  139. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->SyncPinReads
  140. },
  141. { sizeof(PERF_COUNTER_DEFINITION),
  142. 102,
  143. 0,
  144. 103,
  145. 0,
  146. 0,
  147. PERF_DETAIL_WIZARD,
  148. PERF_COUNTER_COUNTER,
  149. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, AsyncPinReads),
  150. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->AsyncPinReads
  151. },
  152. { sizeof(PERF_COUNTER_DEFINITION),
  153. 104,
  154. 0,
  155. 105,
  156. 0,
  157. 0,
  158. PERF_DETAIL_EXPERT,
  159. PERF_SAMPLE_FRACTION,
  160. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, PinReadHits),
  161. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->PinReadHits
  162. },
  163. { sizeof(PERF_COUNTER_DEFINITION),
  164. 104,
  165. 0,
  166. 105,
  167. 0,
  168. 0,
  169. PERF_DETAIL_EXPERT,
  170. PERF_SAMPLE_BASE,
  171. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, PinReadHitsBase),
  172. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->PinReadHitsBase
  173. },
  174. { sizeof(PERF_COUNTER_DEFINITION),
  175. 106,
  176. 0,
  177. 107,
  178. 0,
  179. 0,
  180. PERF_DETAIL_EXPERT,
  181. PERF_COUNTER_COUNTER,
  182. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, CopyReads),
  183. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->CopyReads
  184. },
  185. { sizeof(PERF_COUNTER_DEFINITION),
  186. 108,
  187. 0,
  188. 109,
  189. 0,
  190. 0,
  191. PERF_DETAIL_WIZARD,
  192. PERF_COUNTER_COUNTER,
  193. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, SyncCopyReads),
  194. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->SyncCopyReads
  195. },
  196. { sizeof(PERF_COUNTER_DEFINITION),
  197. 110,
  198. 0,
  199. 111,
  200. 0,
  201. 0,
  202. PERF_DETAIL_WIZARD,
  203. PERF_COUNTER_COUNTER,
  204. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, AsyncCopyReads),
  205. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->AsyncCopyReads
  206. },
  207. { sizeof(PERF_COUNTER_DEFINITION),
  208. 112,
  209. 0,
  210. 113,
  211. 0,
  212. 0,
  213. PERF_DETAIL_EXPERT,
  214. PERF_SAMPLE_FRACTION,
  215. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, CopyReadHits),
  216. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->CopyReadHits
  217. },
  218. { sizeof(PERF_COUNTER_DEFINITION),
  219. 112,
  220. 0,
  221. 113,
  222. 0,
  223. 0,
  224. PERF_DETAIL_EXPERT,
  225. PERF_SAMPLE_BASE,
  226. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, CopyReadHitsBase),
  227. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->CopyReadHitsBase
  228. },
  229. { sizeof(PERF_COUNTER_DEFINITION),
  230. 114,
  231. 0,
  232. 115,
  233. 0,
  234. 0,
  235. PERF_DETAIL_EXPERT,
  236. PERF_COUNTER_COUNTER,
  237. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, MdlReads),
  238. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->MdlReads
  239. },
  240. { sizeof(PERF_COUNTER_DEFINITION),
  241. 116,
  242. 0,
  243. 117,
  244. 0,
  245. 0,
  246. PERF_DETAIL_WIZARD,
  247. PERF_COUNTER_COUNTER,
  248. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, SyncMdlReads),
  249. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->SyncMdlReads
  250. },
  251. { sizeof(PERF_COUNTER_DEFINITION),
  252. 118,
  253. 0,
  254. 119,
  255. 0,
  256. 0,
  257. PERF_DETAIL_WIZARD,
  258. PERF_COUNTER_COUNTER,
  259. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, AsyncMdlReads),
  260. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->AsyncMdlReads
  261. },
  262. { sizeof(PERF_COUNTER_DEFINITION),
  263. 120,
  264. 0,
  265. 121,
  266. 0,
  267. 0,
  268. PERF_DETAIL_EXPERT,
  269. PERF_SAMPLE_FRACTION,
  270. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, MdlReadHits),
  271. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->MdlReadHits
  272. },
  273. { sizeof(PERF_COUNTER_DEFINITION),
  274. 120,
  275. 0,
  276. 121,
  277. 0,
  278. 0,
  279. PERF_DETAIL_EXPERT,
  280. PERF_SAMPLE_BASE,
  281. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, MdlReadHitsBase),
  282. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->MdlReadHitsBase
  283. },
  284. { sizeof(PERF_COUNTER_DEFINITION),
  285. 122,
  286. 0,
  287. 123,
  288. 0,
  289. 0,
  290. PERF_DETAIL_ADVANCED,
  291. PERF_COUNTER_COUNTER,
  292. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, ReadAheads),
  293. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->ReadAheads
  294. },
  295. { sizeof(PERF_COUNTER_DEFINITION),
  296. 124,
  297. 0,
  298. 125,
  299. 0,
  300. -1,
  301. PERF_DETAIL_EXPERT,
  302. PERF_COUNTER_COUNTER,
  303. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, FastReads),
  304. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->FastReads
  305. },
  306. { sizeof(PERF_COUNTER_DEFINITION),
  307. 126,
  308. 0,
  309. 127,
  310. 0,
  311. -1,
  312. PERF_DETAIL_WIZARD,
  313. PERF_COUNTER_COUNTER,
  314. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, SyncFastReads),
  315. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->SyncFastReads
  316. },
  317. { sizeof(PERF_COUNTER_DEFINITION),
  318. 128,
  319. 0,
  320. 129,
  321. 0,
  322. -1,
  323. PERF_DETAIL_WIZARD,
  324. PERF_COUNTER_COUNTER,
  325. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, AsyncFastReads),
  326. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->AsyncFastReads
  327. },
  328. { sizeof(PERF_COUNTER_DEFINITION),
  329. 130,
  330. 0,
  331. 131,
  332. 0,
  333. 0,
  334. PERF_DETAIL_WIZARD,
  335. PERF_COUNTER_COUNTER,
  336. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, FastReadResourceMiss),
  337. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->FastReadResourceMiss
  338. },
  339. { sizeof(PERF_COUNTER_DEFINITION),
  340. 132,
  341. 0,
  342. 133,
  343. 0,
  344. 0,
  345. PERF_DETAIL_WIZARD,
  346. PERF_COUNTER_COUNTER,
  347. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, FastReadNotPossibles),
  348. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->FastReadNotPossibles
  349. },
  350. { sizeof(PERF_COUNTER_DEFINITION),
  351. 134,
  352. 0,
  353. 135,
  354. 0,
  355. 0,
  356. PERF_DETAIL_WIZARD,
  357. PERF_COUNTER_COUNTER,
  358. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, LazyWriteFlushes),
  359. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->LazyWriteFlushes
  360. },
  361. { sizeof(PERF_COUNTER_DEFINITION),
  362. 136,
  363. 0,
  364. 137,
  365. 0,
  366. 0,
  367. PERF_DETAIL_ADVANCED,
  368. PERF_COUNTER_COUNTER,
  369. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, LazyWritePages),
  370. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->LazyWritePages
  371. },
  372. { sizeof(PERF_COUNTER_DEFINITION),
  373. 138,
  374. 0,
  375. 139,
  376. 0,
  377. 0,
  378. PERF_DETAIL_WIZARD,
  379. PERF_COUNTER_COUNTER,
  380. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, DataFlushes),
  381. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->DataFlushes
  382. },
  383. { sizeof(PERF_COUNTER_DEFINITION),
  384. 140,
  385. 0,
  386. 141,
  387. 0,
  388. 0,
  389. PERF_DETAIL_ADVANCED,
  390. PERF_COUNTER_COUNTER,
  391. RTL_FIELD_SIZE(CACHE_COUNTER_DATA, DataPages),
  392. (DWORD)(ULONG_PTR)&((PCACHE_COUNTER_DATA)0)->DataPages
  393. }
  394. };