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.

319 lines
7.3 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. dataheap.c
  5. Abstract:
  6. a file containing the constant data structures used by the Performance
  7. Monitor data for the Heap Performance data objects
  8. Created:
  9. Adrian Marinescu 9-Mar-2000
  10. Revision History:
  11. --*/
  12. #include <windows.h>
  13. #include <winperf.h>
  14. #include <ntprfctr.h>
  15. #include <perfutil.h>
  16. #include "dataheap.h"
  17. // dummy variable for field sizing.
  18. static HEAP_COUNTER_DATA tcd;
  19. //
  20. // Constant structure initializations
  21. // defined in dataheap.h
  22. //
  23. HEAP_DATA_DEFINITION HeapDataDefinition = {
  24. { 0,
  25. sizeof(HEAP_DATA_DEFINITION),
  26. sizeof(PERF_OBJECT_TYPE),
  27. HEAP_OBJECT_TITLE_INDEX,
  28. 0,
  29. (HEAP_OBJECT_TITLE_INDEX + 1),
  30. 0,
  31. PERF_DETAIL_NOVICE,
  32. (sizeof(HEAP_DATA_DEFINITION)-sizeof(PERF_OBJECT_TYPE))/
  33. sizeof(PERF_COUNTER_DEFINITION),
  34. 0,
  35. 0,
  36. UNICODE_CODE_PAGE,
  37. {0L,0L},
  38. {0L,0L}
  39. },
  40. { sizeof(PERF_COUNTER_DEFINITION),
  41. 1762,
  42. 0,
  43. 1763,
  44. 0,
  45. -6,
  46. PERF_DETAIL_WIZARD,
  47. PERF_COUNTER_LARGE_RAWCOUNT,
  48. sizeof (tcd.CommittedBytes),
  49. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->CommittedBytes
  50. },
  51. { sizeof(PERF_COUNTER_DEFINITION),
  52. 1764,
  53. 0,
  54. 1765,
  55. 0,
  56. -7,
  57. PERF_DETAIL_WIZARD,
  58. PERF_COUNTER_LARGE_RAWCOUNT,
  59. sizeof (tcd.ReservedBytes),
  60. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->ReservedBytes
  61. },
  62. { sizeof(PERF_COUNTER_DEFINITION),
  63. 1766,
  64. 0,
  65. 1767,
  66. 0,
  67. -7,
  68. PERF_DETAIL_WIZARD,
  69. PERF_COUNTER_LARGE_RAWCOUNT,
  70. sizeof (tcd.VirtualBytes),
  71. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->VirtualBytes
  72. },
  73. { sizeof(PERF_COUNTER_DEFINITION),
  74. 1768,
  75. 0,
  76. 1769,
  77. 0,
  78. -5,
  79. PERF_DETAIL_WIZARD,
  80. PERF_COUNTER_LARGE_RAWCOUNT,
  81. sizeof (tcd.FreeSpace),
  82. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->FreeSpace
  83. },
  84. { sizeof(PERF_COUNTER_DEFINITION),
  85. 1770,
  86. 0,
  87. 1771,
  88. 0,
  89. -2,
  90. PERF_DETAIL_WIZARD,
  91. PERF_COUNTER_RAWCOUNT,
  92. sizeof (tcd.FreeListLength),
  93. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->FreeListLength
  94. },
  95. { sizeof(PERF_COUNTER_DEFINITION),
  96. 1772,
  97. 0,
  98. 1773,
  99. 0,
  100. -3,
  101. PERF_DETAIL_WIZARD,
  102. PERF_COUNTER_LARGE_RAWCOUNT,
  103. sizeof (tcd.AllocTime),
  104. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->AllocTime
  105. },
  106. { sizeof(PERF_COUNTER_DEFINITION),
  107. 1774,
  108. 0,
  109. 1775,
  110. 0,
  111. -3,
  112. PERF_DETAIL_WIZARD,
  113. PERF_COUNTER_LARGE_RAWCOUNT,
  114. sizeof (tcd.FreeTime),
  115. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->FreeTime
  116. },
  117. { sizeof(PERF_COUNTER_DEFINITION),
  118. 1776,
  119. 0,
  120. 1777,
  121. 0,
  122. -2,
  123. PERF_DETAIL_WIZARD,
  124. PERF_COUNTER_RAWCOUNT,
  125. sizeof (tcd.UncommitedRangesLength),
  126. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->UncommitedRangesLength
  127. },
  128. { sizeof(PERF_COUNTER_DEFINITION),
  129. 1778,
  130. 0,
  131. 1779,
  132. 0,
  133. -3,
  134. PERF_DETAIL_WIZARD,
  135. PERF_COUNTER_RAWCOUNT,
  136. sizeof (tcd.DiffOperations),
  137. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->DiffOperations
  138. },
  139. { sizeof(PERF_COUNTER_DEFINITION),
  140. 1780,
  141. 0,
  142. 1781,
  143. 0,
  144. -3,
  145. PERF_DETAIL_WIZARD,
  146. PERF_COUNTER_COUNTER,
  147. sizeof (tcd.LookasideAllocs),
  148. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->LookasideAllocs
  149. },
  150. { sizeof(PERF_COUNTER_DEFINITION),
  151. 1782,
  152. 0,
  153. 1783,
  154. 0,
  155. -2,
  156. PERF_DETAIL_WIZARD,
  157. PERF_COUNTER_COUNTER,
  158. sizeof (tcd.LookasideFrees),
  159. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->LookasideFrees
  160. },
  161. { sizeof(PERF_COUNTER_DEFINITION),
  162. 1784,
  163. 0,
  164. 1785,
  165. 0,
  166. -2,
  167. PERF_DETAIL_WIZARD,
  168. PERF_COUNTER_COUNTER,
  169. sizeof (tcd.SmallAllocs),
  170. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->SmallAllocs
  171. },
  172. { sizeof(PERF_COUNTER_DEFINITION),
  173. 1786,
  174. 0,
  175. 1787,
  176. 0,
  177. -2,
  178. PERF_DETAIL_WIZARD,
  179. PERF_COUNTER_COUNTER,
  180. sizeof (tcd.SmallFrees),
  181. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->SmallFrees
  182. },
  183. { sizeof(PERF_COUNTER_DEFINITION),
  184. 1788,
  185. 0,
  186. 1789,
  187. 0,
  188. -2,
  189. PERF_DETAIL_WIZARD,
  190. PERF_COUNTER_COUNTER,
  191. sizeof (tcd.MedAllocs),
  192. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->MedAllocs
  193. },
  194. { sizeof(PERF_COUNTER_DEFINITION),
  195. 1790,
  196. 0,
  197. 1791,
  198. 0,
  199. -2,
  200. PERF_DETAIL_WIZARD,
  201. PERF_COUNTER_COUNTER,
  202. sizeof (tcd.MedFrees),
  203. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->MedFrees
  204. },
  205. { sizeof(PERF_COUNTER_DEFINITION),
  206. 1792,
  207. 0,
  208. 1793,
  209. 0,
  210. -2,
  211. PERF_DETAIL_WIZARD,
  212. PERF_COUNTER_COUNTER,
  213. sizeof (tcd.LargeAllocs),
  214. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->LargeAllocs
  215. },
  216. { sizeof(PERF_COUNTER_DEFINITION),
  217. 1794,
  218. 0,
  219. 1795,
  220. 0,
  221. -2,
  222. PERF_DETAIL_WIZARD,
  223. PERF_COUNTER_COUNTER,
  224. sizeof (tcd.LargeFrees),
  225. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->LargeFrees
  226. },
  227. { sizeof(PERF_COUNTER_DEFINITION),
  228. 1796,
  229. 0,
  230. 1797,
  231. 0,
  232. -3,
  233. PERF_DETAIL_WIZARD,
  234. PERF_COUNTER_COUNTER,
  235. sizeof (tcd.TotalAllocs),
  236. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->TotalAllocs
  237. },
  238. { sizeof(PERF_COUNTER_DEFINITION),
  239. 1798,
  240. 0,
  241. 1799,
  242. 0,
  243. -3,
  244. PERF_DETAIL_WIZARD,
  245. PERF_COUNTER_COUNTER,
  246. sizeof (tcd.TotalFrees),
  247. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->TotalFrees
  248. },
  249. { sizeof(PERF_COUNTER_DEFINITION),
  250. 1800,
  251. 0,
  252. 1801,
  253. 0,
  254. -2,
  255. PERF_DETAIL_WIZARD,
  256. PERF_COUNTER_RAWCOUNT,
  257. sizeof (tcd.LookasideBlocks),
  258. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->LookasideBlocks
  259. },
  260. { sizeof(PERF_COUNTER_DEFINITION),
  261. 1802,
  262. 0,
  263. 1803,
  264. 0,
  265. 0,
  266. PERF_DETAIL_WIZARD,
  267. PERF_COUNTER_RAWCOUNT,
  268. sizeof (tcd.LargestLookasideDepth),
  269. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->LargestLookasideDepth
  270. },
  271. { sizeof(PERF_COUNTER_DEFINITION),
  272. 1804,
  273. 0,
  274. 1805,
  275. 0,
  276. 0,
  277. PERF_DETAIL_WIZARD,
  278. PERF_COUNTER_RAWCOUNT,
  279. sizeof (tcd.BlockFragmentation),
  280. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->BlockFragmentation
  281. },
  282. { sizeof(PERF_COUNTER_DEFINITION),
  283. 1806,
  284. 0,
  285. 1807,
  286. 0,
  287. 0,
  288. PERF_DETAIL_WIZARD,
  289. PERF_COUNTER_RAWCOUNT,
  290. sizeof (tcd.VAFragmentation),
  291. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->VAFragmentation
  292. },
  293. { sizeof(PERF_COUNTER_DEFINITION),
  294. 1808,
  295. 0,
  296. 1809,
  297. 0,
  298. 0,
  299. PERF_DETAIL_WIZARD,
  300. PERF_COUNTER_COUNTER,
  301. sizeof (tcd.LockContention),
  302. (DWORD)(ULONG_PTR)&((PHEAP_COUNTER_DATA)0)->LockContention
  303. }
  304. };