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.

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