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.

190 lines
4.2 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. datathrd.c
  5. Abstract:
  6. a file containing the constant data structures used by the Performance
  7. Monitor data for the Thread 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 "datathrd.h"
  21. // dummy variable for field sizing.
  22. static THREAD_COUNTER_DATA tcd;
  23. //
  24. // Constant structure initializations
  25. // defined in datathrd.h
  26. //
  27. THREAD_DATA_DEFINITION ThreadDataDefinition = {
  28. { 0,
  29. sizeof(THREAD_DATA_DEFINITION),
  30. sizeof(PERF_OBJECT_TYPE),
  31. THREAD_OBJECT_TITLE_INDEX,
  32. 0,
  33. 233,
  34. 0,
  35. PERF_DETAIL_NOVICE,
  36. (sizeof(THREAD_DATA_DEFINITION)-sizeof(PERF_OBJECT_TYPE))/
  37. sizeof(PERF_COUNTER_DEFINITION),
  38. 0,
  39. 0,
  40. UNICODE_CODE_PAGE,
  41. {0L,0L},
  42. {10000000L,0L}
  43. },
  44. { sizeof(PERF_COUNTER_DEFINITION),
  45. 6,
  46. 0,
  47. 191,
  48. 0,
  49. 0,
  50. PERF_DETAIL_NOVICE,
  51. PERF_100NSEC_TIMER,
  52. sizeof (tcd.ProcessorTime),
  53. (DWORD)(ULONG_PTR)&((PTHREAD_COUNTER_DATA)0)->ProcessorTime
  54. },
  55. { sizeof(PERF_COUNTER_DEFINITION),
  56. 142,
  57. 0,
  58. 193,
  59. 0,
  60. 0,
  61. PERF_DETAIL_ADVANCED,
  62. PERF_100NSEC_TIMER,
  63. sizeof (tcd.UserTime),
  64. (DWORD)(ULONG_PTR)&((PTHREAD_COUNTER_DATA)0)->UserTime
  65. },
  66. { sizeof(PERF_COUNTER_DEFINITION),
  67. 144,
  68. 0,
  69. 195,
  70. 0,
  71. 0,
  72. PERF_DETAIL_ADVANCED,
  73. PERF_100NSEC_TIMER,
  74. sizeof (tcd.KernelTime),
  75. (DWORD)(ULONG_PTR)&((PTHREAD_COUNTER_DATA)0)->KernelTime
  76. },
  77. { sizeof(PERF_COUNTER_DEFINITION),
  78. 146,
  79. 0,
  80. 197,
  81. 0,
  82. -2,
  83. PERF_DETAIL_ADVANCED,
  84. PERF_COUNTER_COUNTER,
  85. sizeof (tcd.ContextSwitches),
  86. (DWORD)(ULONG_PTR)&((PTHREAD_COUNTER_DATA)0)->ContextSwitches
  87. },
  88. { sizeof(PERF_COUNTER_DEFINITION),
  89. 684,
  90. 0,
  91. 699,
  92. 0,
  93. -4,
  94. PERF_DETAIL_ADVANCED,
  95. PERF_ELAPSED_TIME,
  96. sizeof (tcd.ThreadElapsedTime),
  97. (DWORD)(ULONG_PTR)&((PTHREAD_COUNTER_DATA)0)->ThreadElapsedTime
  98. },
  99. { sizeof(PERF_COUNTER_DEFINITION),
  100. 694,
  101. 0,
  102. 695,
  103. 0,
  104. 0,
  105. PERF_DETAIL_ADVANCED,
  106. PERF_COUNTER_RAWCOUNT,
  107. sizeof (tcd.ThreadPriority),
  108. (DWORD)(ULONG_PTR)&((PTHREAD_COUNTER_DATA)0)->ThreadPriority
  109. },
  110. { sizeof(PERF_COUNTER_DEFINITION),
  111. 682,
  112. 0,
  113. 697,
  114. 0,
  115. 0,
  116. PERF_DETAIL_ADVANCED,
  117. PERF_COUNTER_RAWCOUNT,
  118. sizeof (tcd.ThreadBasePriority),
  119. (DWORD)(ULONG_PTR)&((PTHREAD_COUNTER_DATA)0)->ThreadBasePriority
  120. },
  121. { sizeof(PERF_COUNTER_DEFINITION),
  122. 706,
  123. 0,
  124. 707,
  125. 0,
  126. 0,
  127. PERF_DETAIL_WIZARD,
  128. PERF_COUNTER_RAWCOUNT_HEX,
  129. sizeof (tcd.ThreadStartAddr),
  130. (DWORD)(ULONG_PTR)&((PTHREAD_COUNTER_DATA)0)->ThreadStartAddr
  131. },
  132. { sizeof(PERF_COUNTER_DEFINITION),
  133. 46,
  134. 0,
  135. 47,
  136. 0,
  137. 0,
  138. PERF_DETAIL_WIZARD,
  139. PERF_COUNTER_RAWCOUNT,
  140. sizeof (tcd.ThreadState),
  141. (DWORD)(ULONG_PTR)&((PTHREAD_COUNTER_DATA)0)->ThreadState
  142. },
  143. { sizeof(PERF_COUNTER_DEFINITION),
  144. 336,
  145. 0,
  146. 337,
  147. 0,
  148. 0,
  149. PERF_DETAIL_WIZARD,
  150. PERF_COUNTER_RAWCOUNT,
  151. sizeof (tcd.WaitReason),
  152. (DWORD)(ULONG_PTR)&((PTHREAD_COUNTER_DATA)0)->WaitReason
  153. },
  154. { sizeof(PERF_COUNTER_DEFINITION),
  155. 784,
  156. 0,
  157. 785,
  158. 0,
  159. 0,
  160. PERF_DETAIL_WIZARD,
  161. PERF_COUNTER_RAWCOUNT,
  162. sizeof (tcd.ProcessId),
  163. (DWORD)(ULONG_PTR)&((PTHREAD_COUNTER_DATA)0)->ProcessId
  164. },
  165. { sizeof(PERF_COUNTER_DEFINITION),
  166. 804,
  167. 0,
  168. 805,
  169. 0,
  170. 0,
  171. PERF_DETAIL_WIZARD,
  172. PERF_COUNTER_RAWCOUNT,
  173. sizeof (tcd.ThreadId),
  174. (DWORD)(ULONG_PTR)&((PTHREAD_COUNTER_DATA)0)->ThreadId
  175. }
  176. };
  177.