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.

198 lines
8.2 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. p5data.h
  5. Abstract:
  6. Header file for the p5 Extensible Object data definitions
  7. This file contains definitions to construct the dynamic data
  8. which is returned by the Configuration Registry. Data from
  9. various system API calls is placed into the structures shown
  10. here.
  11. Author:
  12. Russ Blake 12/23/93
  13. Revision History:
  14. --*/
  15. #ifndef _P5DATA_H_
  16. #define _P5DATA_H_
  17. #pragma pack(4)
  18. //----------------------------------------------------------------------------
  19. //
  20. // This structure defines the definition header for this performance object
  21. // This data is initialized in p5data.c and is more or less constant after
  22. // that. Organizationally, it is followed by an instance definition
  23. // structure and a counter data structure for each processor on the system.
  24. //
  25. typedef struct _P5_DATA_DEFINITION
  26. {
  27. PERF_OBJECT_TYPE P5PerfObject;
  28. PERF_COUNTER_DEFINITION Data_read;
  29. PERF_COUNTER_DEFINITION Data_write;
  30. PERF_COUNTER_DEFINITION Data_tlb_miss;
  31. PERF_COUNTER_DEFINITION Data_read_miss;
  32. PERF_COUNTER_DEFINITION Data_write_miss;
  33. PERF_COUNTER_DEFINITION Write_hit_to_me_line;
  34. PERF_COUNTER_DEFINITION Data_cache_line_wb;
  35. PERF_COUNTER_DEFINITION Data_cache_snoops;
  36. PERF_COUNTER_DEFINITION Data_cache_snoop_hits;
  37. PERF_COUNTER_DEFINITION Memory_accesses_in_pipes;
  38. PERF_COUNTER_DEFINITION Bank_conflicts;
  39. PERF_COUNTER_DEFINITION Misaligned_data_ref;
  40. PERF_COUNTER_DEFINITION Code_read;
  41. PERF_COUNTER_DEFINITION Code_tlb_miss;
  42. PERF_COUNTER_DEFINITION Code_cache_miss;
  43. PERF_COUNTER_DEFINITION Segment_loads;
  44. PERF_COUNTER_DEFINITION Branches;
  45. PERF_COUNTER_DEFINITION Btb_hits;
  46. PERF_COUNTER_DEFINITION Taken_branch_or_btb_hits;
  47. PERF_COUNTER_DEFINITION Pipeline_flushes;
  48. PERF_COUNTER_DEFINITION Instructions_executed;
  49. PERF_COUNTER_DEFINITION Instructions_executed_in_vpipe;
  50. PERF_COUNTER_DEFINITION Bus_utilization;
  51. PERF_COUNTER_DEFINITION Pipe_stalled_on_writes;
  52. PERF_COUNTER_DEFINITION Pipe_stalled_on_read;
  53. PERF_COUNTER_DEFINITION Stalled_while_ewbe;
  54. PERF_COUNTER_DEFINITION Locked_bus_cycle;
  55. PERF_COUNTER_DEFINITION Io_rw_cycle;
  56. PERF_COUNTER_DEFINITION Non_cached_memory_ref;
  57. PERF_COUNTER_DEFINITION Pipe_stalled_on_addr_gen;
  58. PERF_COUNTER_DEFINITION Flops;
  59. PERF_COUNTER_DEFINITION DebugRegister0;
  60. PERF_COUNTER_DEFINITION DebugRegister1;
  61. PERF_COUNTER_DEFINITION DebugRegister2;
  62. PERF_COUNTER_DEFINITION DebugRegister3;
  63. PERF_COUNTER_DEFINITION Interrupts;
  64. PERF_COUNTER_DEFINITION Data_rw;
  65. PERF_COUNTER_DEFINITION Data_rw_miss;
  66. // Derived Counters
  67. PERF_COUNTER_DEFINITION PctDataReadMiss;
  68. PERF_COUNTER_DEFINITION PctDataReadBase;
  69. PERF_COUNTER_DEFINITION PctDataWriteMiss;
  70. PERF_COUNTER_DEFINITION PctDataWriteBase;
  71. PERF_COUNTER_DEFINITION PctDataRWMiss;
  72. PERF_COUNTER_DEFINITION PctDataRWBase;
  73. PERF_COUNTER_DEFINITION PctDataTLBMiss;
  74. PERF_COUNTER_DEFINITION PctDataTLBBase;
  75. PERF_COUNTER_DEFINITION PctDataSnoopHits;
  76. PERF_COUNTER_DEFINITION PctDataSnoopBase;
  77. PERF_COUNTER_DEFINITION PctCodeReadMiss;
  78. PERF_COUNTER_DEFINITION PctCodeReadBase;
  79. PERF_COUNTER_DEFINITION PctCodeTLBMiss;
  80. PERF_COUNTER_DEFINITION PctCodeTLBBase;
  81. PERF_COUNTER_DEFINITION PctBTBHits;
  82. PERF_COUNTER_DEFINITION PctBTBBase;
  83. PERF_COUNTER_DEFINITION PctVpipeInst;
  84. PERF_COUNTER_DEFINITION PctVpipeBase;
  85. PERF_COUNTER_DEFINITION PctBranches;
  86. PERF_COUNTER_DEFINITION PctBranchesBase;
  87. } P5_DATA_DEFINITION, *PP5_DATA_DEFINITION;
  88. extern P5_DATA_DEFINITION P5DataDefinition;
  89. // this structure defines the data block that follows each instance
  90. // definition structure for each processor
  91. typedef struct _P5_COUNTER_DATA { // driver index
  92. PERF_COUNTER_BLOCK CounterBlock;
  93. // direct counters
  94. LONGLONG llData_read; // 0x00
  95. LONGLONG llData_write; // 0x01
  96. LONGLONG llData_tlb_miss; // 0x02
  97. LONGLONG llData_read_miss; // 0x03
  98. LONGLONG llData_write_miss; // 0x04
  99. LONGLONG llWrite_hit_to_me_line; // 0x05
  100. LONGLONG llData_cache_line_wb; // 0x06
  101. LONGLONG llData_cache_snoops; // 0x07
  102. LONGLONG llData_cache_snoop_hits; // 0x08
  103. LONGLONG llMemory_accesses_in_pipes; // 0x09
  104. LONGLONG llBank_conflicts; // 0x0a
  105. LONGLONG llMisaligned_data_ref; // 0x0b
  106. LONGLONG llCode_read; // 0x0c
  107. LONGLONG llCode_tlb_miss; // 0x0d
  108. LONGLONG llCode_cache_miss; // 0x0e
  109. LONGLONG llSegment_loads; // 0x0f
  110. LONGLONG llBranches; // 0x12
  111. LONGLONG llBtb_hits; // 0x13
  112. LONGLONG llTaken_branch_or_btb_hits; // 0x14
  113. LONGLONG llPipeline_flushes; // 0x15
  114. LONGLONG llInstructions_executed; // 0x16
  115. LONGLONG llInstructions_executed_in_vpipe;//0x17
  116. LONGLONG llBus_utilization; // 0x18
  117. LONGLONG llPipe_stalled_on_writes; // 0x19
  118. LONGLONG llPipe_stalled_on_read; // 0x1a
  119. LONGLONG llStalled_while_ewbe; // 0x1b
  120. LONGLONG llLocked_bus_cycle; // 0x1c
  121. LONGLONG llIo_rw_cycle; // 0x1d
  122. LONGLONG llNon_cached_memory_ref; // 0x1e
  123. LONGLONG llPipe_stalled_on_addr_gen; // 0x1f
  124. LONGLONG llFlops; // 0x22
  125. LONGLONG llDebugRegister0; // 0x23
  126. LONGLONG llDebugRegister1; // 0x24
  127. LONGLONG llDebugRegister2; // 0x25
  128. LONGLONG llDebugRegister3; // 0x26
  129. LONGLONG llInterrupts; // 0x27
  130. LONGLONG llData_rw; // 0x28
  131. LONGLONG llData_rw_miss; // 0x29
  132. // Derived Counters // counter index used
  133. DWORD dwPctDataReadMiss; // 0x03
  134. DWORD dwPctDataReadBase; // 0x00
  135. DWORD dwPctDataWriteMiss; // 0x04
  136. DWORD dwPctDataWriteBase; // 0x01
  137. DWORD dwPctDataRWMiss; // Ox29
  138. DWORD dwPctDataRWBase; // 0x28
  139. DWORD dwPctDataTLBMiss; // 0x02
  140. DWORD dwPctDataTLBBase; // 0x28
  141. DWORD dwPctDataSnoopHits; // 0x08
  142. DWORD dwPctDataSnoopBase; // 0x07
  143. DWORD dwPctCodeReadMiss; // 0x0e
  144. DWORD dwPctCodeReadBase; // 0x0c
  145. DWORD dwPctCodeTLBMiss; // 0x0d
  146. DWORD dwPctCodeTLBBase; // 0x0c
  147. DWORD dwPctBTBHits; // 0x13
  148. DWORD dwPctBTBBase; // 0x12
  149. DWORD dwPctVpipeInst; // 0x17
  150. DWORD dwPctVpipeBase; // 0x16
  151. DWORD dwPctBranches; // 0x12
  152. DWORD dwPctBranchesBase; // 0x16
  153. } P5_COUNTER_DATA, *PP5_COUNTER_DATA;
  154. extern DWORD P5IndexToData[]; // table to find data field
  155. extern DWORD P5IndexMax; // number of direct counters
  156. extern BOOL dwDerivedp5Counters[]; // table to find counters used in derived ctrs.
  157. // table entry to map direct counters to derived counter fields
  158. typedef struct _DERIVED_P5_COUNTER_DEF {
  159. DWORD dwCR0Index; // if the EventId[0] == this field
  160. DWORD dwCR1Index; // and EventId[1] == this field then store
  161. DWORD dwCR0FieldOffset; // the Low DWORD of Counter[0] at this offset and
  162. DWORD dwCR1FieldOffset; // the low DWORD of Counter[1] at this offset
  163. } DERIVED_P5_COUNTER_DEF, *PDERIVED_P5_COUNTER_DEF;
  164. extern DERIVED_P5_COUNTER_DEF P5DerivedCounters[]; // table of derived counters
  165. extern DWORD dwP5DerivedCountersCount; // count of derived counter ref's
  166. #pragma pack ()
  167. #endif //_P5DATA_H_