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.

1139 lines
33 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. p6data.c
  5. Abstract:
  6. a file containing the constant data structures used by the Performance
  7. Monitor data for the P5 Extensible Objects.
  8. This file contains a set of constant data structures which are
  9. currently defined for the P5 Extensible Objects. This is an
  10. example of how other such objects could be defined.
  11. Created:
  12. Russ Blake 24 Dec 93
  13. Revision History:
  14. None.
  15. --*/
  16. //
  17. // Include Files
  18. //
  19. #include <windows.h>
  20. #include <winperf.h>
  21. #include <assert.h>
  22. #include "p5ctrnam.h"
  23. #include "pentdata.h"
  24. //
  25. // Constant structure initializations for the structure defined in p6data.h
  26. //
  27. P6_DATA_DEFINITION P6DataDefinition = {
  28. {
  29. sizeof(P6_DATA_DEFINITION) + sizeof(P6_COUNTER_DATA),
  30. sizeof(P6_DATA_DEFINITION),
  31. sizeof(PERF_OBJECT_TYPE),
  32. PENTIUM,
  33. 0,
  34. PENTIUM,
  35. 0,
  36. PERF_DETAIL_WIZARD,
  37. (sizeof(P6_DATA_DEFINITION)-sizeof(PERF_OBJECT_TYPE))/
  38. sizeof(PERF_COUNTER_DEFINITION),
  39. 0,
  40. 0,
  41. 0
  42. },
  43. { // 1
  44. sizeof(PERF_COUNTER_DEFINITION),
  45. P6_LD_BLOCKS,
  46. 0,
  47. P6_LD_BLOCKS,
  48. 0,
  49. 0,
  50. PERF_DETAIL_WIZARD,
  51. PERF_COUNTER_BULK_COUNT,
  52. sizeof(((PP6_COUNTER_DATA)0)->llStoreBufferBlocks),
  53. (DWORD)&((PP6_COUNTER_DATA)0)->llStoreBufferBlocks
  54. },
  55. { // 2
  56. sizeof(PERF_COUNTER_DEFINITION),
  57. P6_SB_DRAINS,
  58. 0,
  59. P6_SB_DRAINS,
  60. 0,
  61. 0,
  62. PERF_DETAIL_WIZARD,
  63. PERF_COUNTER_BULK_COUNT,
  64. sizeof(((PP6_COUNTER_DATA)0)->llStoreBufferDrainCycles),
  65. (DWORD)&((PP6_COUNTER_DATA)0)->llStoreBufferDrainCycles
  66. },
  67. { // 3
  68. sizeof(PERF_COUNTER_DEFINITION),
  69. P6_MISALIGN_MEM_REF,
  70. 0,
  71. P6_MISALIGN_MEM_REF,
  72. 0,
  73. 0,
  74. PERF_DETAIL_WIZARD,
  75. PERF_COUNTER_BULK_COUNT,
  76. sizeof(((PP6_COUNTER_DATA)0)->llMisalignedDataRef),
  77. (DWORD)&((PP6_COUNTER_DATA)0)->llMisalignedDataRef
  78. },
  79. { // 4
  80. sizeof(PERF_COUNTER_DEFINITION),
  81. P6_SEGMENT_REG_LOADS,
  82. 0,
  83. P6_SEGMENT_REG_LOADS,
  84. 0,
  85. 0,
  86. PERF_DETAIL_WIZARD,
  87. PERF_COUNTER_BULK_COUNT,
  88. sizeof(((PP6_COUNTER_DATA)0)->llSegmentLoads),
  89. (DWORD)&((PP6_COUNTER_DATA)0)->llSegmentLoads
  90. },
  91. { // 5
  92. sizeof(PERF_COUNTER_DEFINITION),
  93. P6_FP_COMP_OPS_EXE,
  94. 0,
  95. P6_FP_COMP_OPS_EXE,
  96. 0,
  97. 0,
  98. PERF_DETAIL_WIZARD,
  99. PERF_COUNTER_BULK_COUNT,
  100. sizeof(((PP6_COUNTER_DATA)0)->llFLOPSExecuted),
  101. (DWORD)&((PP6_COUNTER_DATA)0)->llFLOPSExecuted
  102. },
  103. { // 6
  104. sizeof(PERF_COUNTER_DEFINITION),
  105. P6_FP_ASSIST,
  106. 0,
  107. P6_FP_ASSIST,
  108. 0,
  109. 0,
  110. PERF_DETAIL_WIZARD,
  111. PERF_COUNTER_BULK_COUNT,
  112. sizeof(((PP6_COUNTER_DATA)0)->llMicrocodeFPExceptions),
  113. (DWORD)&((PP6_COUNTER_DATA)0)->llMicrocodeFPExceptions
  114. },
  115. { // 7
  116. sizeof(PERF_COUNTER_DEFINITION),
  117. P6_MUL,
  118. 0,
  119. P6_MUL,
  120. 0,
  121. 0,
  122. PERF_DETAIL_WIZARD,
  123. PERF_COUNTER_BULK_COUNT,
  124. sizeof(((PP6_COUNTER_DATA)0)->llMultiplies),
  125. (DWORD)&((PP6_COUNTER_DATA)0)->llMultiplies
  126. },
  127. { // 8
  128. sizeof(PERF_COUNTER_DEFINITION),
  129. P6_DIV,
  130. 0,
  131. P6_DIV,
  132. 0,
  133. 0,
  134. PERF_DETAIL_WIZARD,
  135. PERF_COUNTER_BULK_COUNT,
  136. sizeof(((PP6_COUNTER_DATA)0)->llDivides),
  137. (DWORD)&((PP6_COUNTER_DATA)0)->llDivides
  138. },
  139. { // 9
  140. sizeof(PERF_COUNTER_DEFINITION),
  141. P6_CYCLES_DIV_BUSY,
  142. 0,
  143. P6_CYCLES_DIV_BUSY,
  144. 0,
  145. 0,
  146. PERF_DETAIL_WIZARD,
  147. PERF_COUNTER_BULK_COUNT,
  148. sizeof(((PP6_COUNTER_DATA)0)->llDividerBusyCycles),
  149. (DWORD)&((PP6_COUNTER_DATA)0)->llDividerBusyCycles
  150. },
  151. { // 10
  152. sizeof(PERF_COUNTER_DEFINITION),
  153. P6_L2_ADS,
  154. 0,
  155. P6_L2_ADS,
  156. 0,
  157. 0,
  158. PERF_DETAIL_WIZARD,
  159. PERF_COUNTER_BULK_COUNT,
  160. sizeof(((PP6_COUNTER_DATA)0)->llL2AddressStrobes),
  161. (DWORD)&((PP6_COUNTER_DATA)0)->llL2AddressStrobes
  162. },
  163. { // 11
  164. sizeof(PERF_COUNTER_DEFINITION),
  165. P6_L2_DBUS_BUSY,
  166. 0,
  167. P6_L2_DBUS_BUSY,
  168. 0,
  169. 0,
  170. PERF_DETAIL_WIZARD,
  171. PERF_COUNTER_BULK_COUNT,
  172. sizeof(((PP6_COUNTER_DATA)0)->llL2DataBusBusyCycles),
  173. (DWORD)&((PP6_COUNTER_DATA)0)->llL2DataBusBusyCycles
  174. },
  175. { // 12
  176. sizeof(PERF_COUNTER_DEFINITION),
  177. P6_L2_DBUS_BUSY_RD,
  178. 0,
  179. P6_L2_DBUS_BUSY_RD,
  180. 0,
  181. 0,
  182. PERF_DETAIL_WIZARD,
  183. PERF_COUNTER_BULK_COUNT,
  184. sizeof(((PP6_COUNTER_DATA)0)->llL2DataBusToCpuBusyCycles),
  185. (DWORD)&((PP6_COUNTER_DATA)0)->llL2DataBusToCpuBusyCycles
  186. },
  187. { // 13
  188. sizeof(PERF_COUNTER_DEFINITION),
  189. P6_L2_LINES_IN,
  190. 0,
  191. P6_L2_LINES_IN,
  192. 0,
  193. 0,
  194. PERF_DETAIL_WIZARD,
  195. PERF_COUNTER_BULK_COUNT,
  196. sizeof(((PP6_COUNTER_DATA)0)->llL2LinesAllocated),
  197. (DWORD)&((PP6_COUNTER_DATA)0)->llL2LinesAllocated
  198. },
  199. { // 14
  200. sizeof(PERF_COUNTER_DEFINITION),
  201. P6_L2_M_LINES_IN,
  202. 0,
  203. P6_L2_M_LINES_IN,
  204. 0,
  205. 0,
  206. PERF_DETAIL_WIZARD,
  207. PERF_COUNTER_BULK_COUNT,
  208. sizeof(((PP6_COUNTER_DATA)0)->llL2LinesMState),
  209. (DWORD)&((PP6_COUNTER_DATA)0)->llL2LinesMState
  210. },
  211. { //15
  212. sizeof(PERF_COUNTER_DEFINITION),
  213. P6_L2_LINES_OUT,
  214. 0,
  215. P6_L2_LINES_OUT,
  216. 0,
  217. 0,
  218. PERF_DETAIL_WIZARD,
  219. PERF_COUNTER_BULK_COUNT,
  220. sizeof(((PP6_COUNTER_DATA)0)->llL2LinesRemoved),
  221. (DWORD)&((PP6_COUNTER_DATA)0)->llL2LinesRemoved
  222. },
  223. { // 16
  224. sizeof(PERF_COUNTER_DEFINITION),
  225. P6_L2_M_LINES_OUT,
  226. 0,
  227. P6_L2_M_LINES_OUT,
  228. 0,
  229. 0,
  230. PERF_DETAIL_WIZARD,
  231. PERF_COUNTER_BULK_COUNT,
  232. sizeof(((PP6_COUNTER_DATA)0)->llL2LinesMStateRemoved),
  233. (DWORD)&((PP6_COUNTER_DATA)0)->llL2LinesMStateRemoved
  234. },
  235. { // 17
  236. sizeof(PERF_COUNTER_DEFINITION),
  237. P6_L2_IFETCH,
  238. 0,
  239. P6_L2_IFETCH,
  240. 0,
  241. 0,
  242. PERF_DETAIL_WIZARD,
  243. PERF_COUNTER_BULK_COUNT,
  244. sizeof(((PP6_COUNTER_DATA)0)->llL2InstructionFetches),
  245. (DWORD)&((PP6_COUNTER_DATA)0)->llL2InstructionFetches
  246. },
  247. { // 18
  248. sizeof(PERF_COUNTER_DEFINITION),
  249. P6_L2_LD,
  250. 0,
  251. P6_L2_LD,
  252. 0,
  253. 0,
  254. PERF_DETAIL_WIZARD,
  255. PERF_COUNTER_BULK_COUNT,
  256. sizeof(((PP6_COUNTER_DATA)0)->llL2DataLoads),
  257. (DWORD)&((PP6_COUNTER_DATA)0)->llL2DataLoads
  258. },
  259. { // 19
  260. sizeof(PERF_COUNTER_DEFINITION),
  261. P6_L2_ST,
  262. 0,
  263. P6_L2_ST,
  264. 0,
  265. 0,
  266. PERF_DETAIL_WIZARD,
  267. PERF_COUNTER_BULK_COUNT,
  268. sizeof(((PP6_COUNTER_DATA)0)->llL2DataStores),
  269. (DWORD)&((PP6_COUNTER_DATA)0)->llL2DataStores
  270. },
  271. { // 20
  272. sizeof(PERF_COUNTER_DEFINITION),
  273. P6_L2_RQSTS,
  274. 0,
  275. P6_L2_RQSTS,
  276. 0,
  277. 0,
  278. PERF_DETAIL_WIZARD,
  279. PERF_COUNTER_BULK_COUNT,
  280. sizeof(((PP6_COUNTER_DATA)0)->llL2Requests),
  281. (DWORD)&((PP6_COUNTER_DATA)0)->llL2Requests
  282. },
  283. { // 21
  284. sizeof(PERF_COUNTER_DEFINITION),
  285. P6_DATA_MEM_REFS,
  286. 0,
  287. P6_DATA_MEM_REFS,
  288. 0,
  289. 0,
  290. PERF_DETAIL_WIZARD,
  291. PERF_COUNTER_BULK_COUNT,
  292. sizeof(((PP6_COUNTER_DATA)0)->llDataMemoryReferences),
  293. (DWORD)&((PP6_COUNTER_DATA)0)->llDataMemoryReferences
  294. },
  295. { // 22
  296. sizeof(PERF_COUNTER_DEFINITION),
  297. P6_DCU_LINES_IN,
  298. 0,
  299. P6_DCU_LINES_IN,
  300. 0,
  301. 0,
  302. PERF_DETAIL_WIZARD,
  303. PERF_COUNTER_BULK_COUNT,
  304. sizeof(((PP6_COUNTER_DATA)0)->llDCULinesAllocated),
  305. (DWORD)&((PP6_COUNTER_DATA)0)->llDCULinesAllocated
  306. },
  307. { //23
  308. sizeof(PERF_COUNTER_DEFINITION),
  309. P6_DCU_M_LINES_IN,
  310. 0,
  311. P6_DCU_M_LINES_IN,
  312. 0,
  313. 0,
  314. PERF_DETAIL_WIZARD,
  315. PERF_COUNTER_BULK_COUNT,
  316. sizeof(((PP6_COUNTER_DATA)0)->llDCUMStateLinesAllocated),
  317. (DWORD)&((PP6_COUNTER_DATA)0)->llDCUMStateLinesAllocated
  318. },
  319. { // 24
  320. sizeof(PERF_COUNTER_DEFINITION),
  321. P6_DCU_M_LINES_OUT,
  322. 0,
  323. P6_DCU_M_LINES_OUT,
  324. 0,
  325. 0,
  326. PERF_DETAIL_WIZARD,
  327. PERF_COUNTER_BULK_COUNT,
  328. sizeof(((PP6_COUNTER_DATA)0)->llDCUMStateLinesEvicted),
  329. (DWORD)&((PP6_COUNTER_DATA)0)->llDCUMStateLinesEvicted
  330. },
  331. { // 25
  332. sizeof(PERF_COUNTER_DEFINITION),
  333. P6_DCU_MISS_OUTSTANDING,
  334. 0,
  335. P6_DCU_MISS_OUTSTANDING,
  336. 0,
  337. 0,
  338. PERF_DETAIL_WIZARD,
  339. PERF_COUNTER_BULK_COUNT,
  340. sizeof(((PP6_COUNTER_DATA)0)->llWeightedDCUMissesOutstd),
  341. (DWORD)&((PP6_COUNTER_DATA)0)->llWeightedDCUMissesOutstd
  342. },
  343. { // 26
  344. sizeof(PERF_COUNTER_DEFINITION),
  345. P6_BUS_REQ_OUTSTANDING,
  346. 0,
  347. P6_BUS_REQ_OUTSTANDING,
  348. 0,
  349. 0,
  350. PERF_DETAIL_WIZARD,
  351. PERF_COUNTER_BULK_COUNT,
  352. sizeof(((PP6_COUNTER_DATA)0)->llBusRequestsOutstanding),
  353. (DWORD)&((PP6_COUNTER_DATA)0)->llBusRequestsOutstanding
  354. },
  355. { // 27
  356. sizeof(PERF_COUNTER_DEFINITION),
  357. P6_BUS_BNR_DRV,
  358. 0,
  359. P6_BUS_BNR_DRV,
  360. 0,
  361. 0,
  362. PERF_DETAIL_WIZARD,
  363. PERF_COUNTER_BULK_COUNT,
  364. sizeof(((PP6_COUNTER_DATA)0)->llBusBNRPinDriveCycles),
  365. (DWORD)&((PP6_COUNTER_DATA)0)->llBusBNRPinDriveCycles
  366. },
  367. { // 28
  368. sizeof(PERF_COUNTER_DEFINITION),
  369. P6_BUS_DRDY_CLOCKS,
  370. 0,
  371. P6_BUS_DRDY_CLOCKS,
  372. 0,
  373. 0,
  374. PERF_DETAIL_WIZARD,
  375. PERF_COUNTER_BULK_COUNT,
  376. sizeof(((PP6_COUNTER_DATA)0)->llBusDRDYAssertedClocks),
  377. (DWORD)&((PP6_COUNTER_DATA)0)->llBusDRDYAssertedClocks
  378. },
  379. { // 29
  380. sizeof(PERF_COUNTER_DEFINITION),
  381. P6_BUS_LOCK_CLOCKS,
  382. 0,
  383. P6_BUS_LOCK_CLOCKS,
  384. 0,
  385. 0,
  386. PERF_DETAIL_WIZARD,
  387. PERF_COUNTER_BULK_COUNT,
  388. sizeof(((PP6_COUNTER_DATA)0)->llBusLockAssertedClocks),
  389. (DWORD)&((PP6_COUNTER_DATA)0)->llBusLockAssertedClocks
  390. },
  391. { //30
  392. sizeof(PERF_COUNTER_DEFINITION),
  393. P6_BUS_DATA_RCV,
  394. 0,
  395. P6_BUS_DATA_RCV,
  396. 0,
  397. 0,
  398. PERF_DETAIL_WIZARD,
  399. PERF_COUNTER_BULK_COUNT,
  400. sizeof(((PP6_COUNTER_DATA)0)->llBusClocksReceivingData),
  401. (DWORD)&((PP6_COUNTER_DATA)0)->llBusClocksReceivingData
  402. },
  403. { // 31
  404. sizeof(PERF_COUNTER_DEFINITION),
  405. P6_BUS_TRANS_BRD,
  406. 0,
  407. P6_BUS_TRANS_BRD,
  408. 0,
  409. 0,
  410. PERF_DETAIL_WIZARD,
  411. PERF_COUNTER_BULK_COUNT,
  412. sizeof(((PP6_COUNTER_DATA)0)->llBusBurstReadTransactions),
  413. (DWORD)&((PP6_COUNTER_DATA)0)->llBusBurstReadTransactions
  414. },
  415. { // 32
  416. sizeof(PERF_COUNTER_DEFINITION),
  417. P6_BUS_TRANS_RFO,
  418. 0,
  419. P6_BUS_TRANS_RFO,
  420. 0,
  421. 0,
  422. PERF_DETAIL_WIZARD,
  423. PERF_COUNTER_BULK_COUNT,
  424. sizeof(((PP6_COUNTER_DATA)0)->llBusReadForOwnershipTrans),
  425. (DWORD)&((PP6_COUNTER_DATA)0)->llBusReadForOwnershipTrans
  426. },
  427. { // 33
  428. sizeof(PERF_COUNTER_DEFINITION),
  429. P6_BUS_TRANS_WB,
  430. 0,
  431. P6_BUS_TRANS_WB,
  432. 0,
  433. 0,
  434. PERF_DETAIL_WIZARD,
  435. PERF_COUNTER_BULK_COUNT,
  436. sizeof(((PP6_COUNTER_DATA)0)->llBusWritebackTransactions),
  437. (DWORD)&((PP6_COUNTER_DATA)0)->llBusWritebackTransactions
  438. },
  439. { // 34
  440. sizeof(PERF_COUNTER_DEFINITION),
  441. P6_BUS_TRANS_IFETCH,
  442. 0,
  443. P6_BUS_TRANS_IFETCH,
  444. 0,
  445. 0,
  446. PERF_DETAIL_WIZARD,
  447. PERF_COUNTER_BULK_COUNT,
  448. sizeof(((PP6_COUNTER_DATA)0)->llBusInstructionFetches),
  449. (DWORD)&((PP6_COUNTER_DATA)0)->llBusInstructionFetches
  450. },
  451. { // 35
  452. sizeof(PERF_COUNTER_DEFINITION),
  453. P6_BUS_TRANS_INVAL,
  454. 0,
  455. P6_BUS_TRANS_INVAL,
  456. 0,
  457. 0,
  458. PERF_DETAIL_WIZARD,
  459. PERF_COUNTER_BULK_COUNT,
  460. sizeof(((PP6_COUNTER_DATA)0)->llBusInvalidateTransactions),
  461. (DWORD)&((PP6_COUNTER_DATA)0)->llBusInvalidateTransactions
  462. },
  463. { // 36
  464. sizeof(PERF_COUNTER_DEFINITION),
  465. P6_BUS_TRANS_PWR,
  466. 0,
  467. P6_BUS_TRANS_PWR,
  468. 0,
  469. 0,
  470. PERF_DETAIL_WIZARD,
  471. PERF_COUNTER_BULK_COUNT,
  472. sizeof(((PP6_COUNTER_DATA)0)->llBusPartialWriteTransactions),
  473. (DWORD)&((PP6_COUNTER_DATA)0)->llBusPartialWriteTransactions
  474. },
  475. { // 37
  476. sizeof(PERF_COUNTER_DEFINITION),
  477. P6_BUS_TRANS_P,
  478. 0,
  479. P6_BUS_TRANS_P,
  480. 0,
  481. 0,
  482. PERF_DETAIL_WIZARD,
  483. PERF_COUNTER_BULK_COUNT,
  484. sizeof(((PP6_COUNTER_DATA)0)->llBusPartialTransactions),
  485. (DWORD)&((PP6_COUNTER_DATA)0)->llBusPartialTransactions
  486. },
  487. { // 38
  488. sizeof(PERF_COUNTER_DEFINITION),
  489. P6_BUS_TRANS_IO,
  490. 0,
  491. P6_BUS_TRANS_IO,
  492. 0,
  493. 0,
  494. PERF_DETAIL_WIZARD,
  495. PERF_COUNTER_BULK_COUNT,
  496. sizeof(((PP6_COUNTER_DATA)0)->llBusIOTransactions),
  497. (DWORD)&((PP6_COUNTER_DATA)0)->llBusIOTransactions
  498. },
  499. { // 39
  500. sizeof(PERF_COUNTER_DEFINITION),
  501. P6_BUS_TRANS_DEF,
  502. 0,
  503. P6_BUS_TRANS_DEF,
  504. 0,
  505. 0,
  506. PERF_DETAIL_WIZARD,
  507. PERF_COUNTER_BULK_COUNT,
  508. sizeof(((PP6_COUNTER_DATA)0)->llBusDeferredTransactions),
  509. (DWORD)&((PP6_COUNTER_DATA)0)->llBusDeferredTransactions
  510. },
  511. { // 40
  512. sizeof(PERF_COUNTER_DEFINITION),
  513. P6_BUS_TRANS_BURST,
  514. 0,
  515. P6_BUS_TRANS_BURST,
  516. 0,
  517. 0,
  518. PERF_DETAIL_WIZARD,
  519. PERF_COUNTER_BULK_COUNT,
  520. sizeof(((PP6_COUNTER_DATA)0)->llBusBurstTransactions),
  521. (DWORD)&((PP6_COUNTER_DATA)0)->llBusBurstTransactions
  522. },
  523. { // 41
  524. sizeof(PERF_COUNTER_DEFINITION),
  525. P6_BUS_TRANS_MEM,
  526. 0,
  527. P6_BUS_TRANS_MEM,
  528. 0,
  529. 0,
  530. PERF_DETAIL_WIZARD,
  531. PERF_COUNTER_BULK_COUNT,
  532. sizeof(((PP6_COUNTER_DATA)0)->llBusMemoryTransactions),
  533. (DWORD)&((PP6_COUNTER_DATA)0)->llBusMemoryTransactions
  534. },
  535. { // 42
  536. sizeof(PERF_COUNTER_DEFINITION),
  537. P6_BUS_TRANS_ANY,
  538. 0,
  539. P6_BUS_TRANS_ANY,
  540. 0,
  541. 0,
  542. PERF_DETAIL_WIZARD,
  543. PERF_COUNTER_BULK_COUNT,
  544. sizeof(((PP6_COUNTER_DATA)0)->llBusAllTransactions),
  545. (DWORD)&((PP6_COUNTER_DATA)0)->llBusAllTransactions
  546. },
  547. { // 43
  548. sizeof(PERF_COUNTER_DEFINITION),
  549. P6_CPU_CLK_UNHALTED,
  550. 0,
  551. P6_CPU_CLK_UNHALTED,
  552. 0,
  553. 0,
  554. PERF_DETAIL_WIZARD,
  555. PERF_COUNTER_BULK_COUNT,
  556. sizeof(((PP6_COUNTER_DATA)0)->llCPUWasNotHaltedCycles),
  557. (DWORD)&((PP6_COUNTER_DATA)0)->llCPUWasNotHaltedCycles
  558. },
  559. { // 44
  560. sizeof(PERF_COUNTER_DEFINITION),
  561. P6_BUS_HIT_DRV,
  562. 0,
  563. P6_BUS_HIT_DRV,
  564. 0,
  565. 0,
  566. PERF_DETAIL_WIZARD,
  567. PERF_COUNTER_BULK_COUNT,
  568. sizeof(((PP6_COUNTER_DATA)0)->llBusCPUDrivesHitCycles),
  569. (DWORD)&((PP6_COUNTER_DATA)0)->llBusCPUDrivesHitCycles
  570. },
  571. { // 45
  572. sizeof(PERF_COUNTER_DEFINITION),
  573. P6_BUS_HITM_DRV,
  574. 0,
  575. P6_BUS_HITM_DRV,
  576. 0,
  577. 0,
  578. PERF_DETAIL_WIZARD,
  579. PERF_COUNTER_BULK_COUNT,
  580. sizeof(((PP6_COUNTER_DATA)0)->llBusCPUDrivesHITMCycles),
  581. (DWORD)&((PP6_COUNTER_DATA)0)->llBusCPUDrivesHITMCycles
  582. },
  583. { // 46
  584. sizeof(PERF_COUNTER_DEFINITION),
  585. P6_BUS_SNOOP_STALL,
  586. 0,
  587. P6_BUS_SNOOP_STALL,
  588. 0,
  589. 0,
  590. PERF_DETAIL_WIZARD,
  591. PERF_COUNTER_BULK_COUNT,
  592. sizeof(((PP6_COUNTER_DATA)0)->llBusSnoopStalledCycles),
  593. (DWORD)&((PP6_COUNTER_DATA)0)->llBusSnoopStalledCycles
  594. },
  595. { // 47
  596. sizeof(PERF_COUNTER_DEFINITION),
  597. P6_IFU_IFETCH,
  598. 0,
  599. P6_IFU_IFETCH,
  600. 0,
  601. 0,
  602. PERF_DETAIL_WIZARD,
  603. PERF_COUNTER_BULK_COUNT,
  604. sizeof(((PP6_COUNTER_DATA)0)->llInstructionFetches),
  605. (DWORD)&((PP6_COUNTER_DATA)0)->llInstructionFetches
  606. },
  607. { // 48
  608. sizeof(PERF_COUNTER_DEFINITION),
  609. P6_IFU_IFETCH_MISS,
  610. 0,
  611. P6_IFU_IFETCH_MISS,
  612. 0,
  613. 0,
  614. PERF_DETAIL_WIZARD,
  615. PERF_COUNTER_BULK_COUNT,
  616. sizeof(((PP6_COUNTER_DATA)0)->llInstructionFetchMisses),
  617. (DWORD)&((PP6_COUNTER_DATA)0)->llInstructionFetchMisses
  618. },
  619. { // 49
  620. sizeof(PERF_COUNTER_DEFINITION),
  621. P6_ITLB_MISS,
  622. 0,
  623. P6_ITLB_MISS,
  624. 0,
  625. 0,
  626. PERF_DETAIL_WIZARD,
  627. PERF_COUNTER_BULK_COUNT,
  628. sizeof(((PP6_COUNTER_DATA)0)->llInstructionTLBMisses),
  629. (DWORD)&((PP6_COUNTER_DATA)0)->llInstructionTLBMisses
  630. },
  631. { // 50
  632. sizeof(PERF_COUNTER_DEFINITION),
  633. P6_IFU_MEM_STALL,
  634. 0,
  635. P6_IFU_MEM_STALL,
  636. 0,
  637. 0,
  638. PERF_DETAIL_WIZARD,
  639. PERF_COUNTER_BULK_COUNT,
  640. sizeof(((PP6_COUNTER_DATA)0)->llInstructionFetcthStalledCycles),
  641. (DWORD)&((PP6_COUNTER_DATA)0)->llInstructionFetcthStalledCycles
  642. },
  643. { // 51
  644. sizeof(PERF_COUNTER_DEFINITION),
  645. P6_ILD_STALL,
  646. 0,
  647. P6_ILD_STALL,
  648. 0,
  649. 0,
  650. PERF_DETAIL_WIZARD,
  651. PERF_COUNTER_BULK_COUNT,
  652. sizeof(((PP6_COUNTER_DATA)0)->llInstructionLenDecoderStalledCycles),
  653. (DWORD)&((PP6_COUNTER_DATA)0)->llInstructionLenDecoderStalledCycles
  654. },
  655. { // 52
  656. sizeof(PERF_COUNTER_DEFINITION),
  657. P6_RESOURCE_STALLS,
  658. 0,
  659. P6_RESOURCE_STALLS,
  660. 0,
  661. 0,
  662. PERF_DETAIL_WIZARD,
  663. PERF_COUNTER_BULK_COUNT,
  664. sizeof(((PP6_COUNTER_DATA)0)->llResourceRelatedStalls),
  665. (DWORD)&((PP6_COUNTER_DATA)0)->llResourceRelatedStalls
  666. },
  667. { // 53
  668. sizeof(PERF_COUNTER_DEFINITION),
  669. P6_INST_RETIRED,
  670. 0,
  671. P6_INST_RETIRED,
  672. 0,
  673. 0,
  674. PERF_DETAIL_WIZARD,
  675. PERF_COUNTER_BULK_COUNT,
  676. sizeof(((PP6_COUNTER_DATA)0)->llInstructionsRetired),
  677. (DWORD)&((PP6_COUNTER_DATA)0)->llInstructionsRetired
  678. },
  679. { // 54
  680. sizeof(PERF_COUNTER_DEFINITION),
  681. P6_FLOPS,
  682. 0,
  683. P6_FLOPS,
  684. 0,
  685. 0,
  686. PERF_DETAIL_WIZARD,
  687. PERF_COUNTER_BULK_COUNT,
  688. sizeof(((PP6_COUNTER_DATA)0)->llFPComputeOpersRetired),
  689. (DWORD)&((PP6_COUNTER_DATA)0)->llFPComputeOpersRetired
  690. },
  691. { // 55
  692. sizeof(PERF_COUNTER_DEFINITION),
  693. P6_UOPS_RETIRED,
  694. 0,
  695. P6_UOPS_RETIRED,
  696. 0,
  697. 0,
  698. PERF_DETAIL_WIZARD,
  699. PERF_COUNTER_BULK_COUNT,
  700. sizeof(((PP6_COUNTER_DATA)0)->llUOPsRetired),
  701. (DWORD)&((PP6_COUNTER_DATA)0)->llUOPsRetired
  702. },
  703. { // 56
  704. sizeof(PERF_COUNTER_DEFINITION),
  705. P6_BR_INST_RETIRED,
  706. 0,
  707. P6_BR_INST_RETIRED,
  708. 0,
  709. 0,
  710. PERF_DETAIL_WIZARD,
  711. PERF_COUNTER_BULK_COUNT,
  712. sizeof(((PP6_COUNTER_DATA)0)->llBranchesRetired),
  713. (DWORD)&((PP6_COUNTER_DATA)0)->llBranchesRetired
  714. },
  715. { // 57
  716. sizeof(PERF_COUNTER_DEFINITION),
  717. P6_BR_MISS_PRED_RETIRED,
  718. 0,
  719. P6_BR_MISS_PRED_RETIRED,
  720. 0,
  721. 0,
  722. PERF_DETAIL_WIZARD,
  723. PERF_COUNTER_BULK_COUNT,
  724. sizeof(((PP6_COUNTER_DATA)0)->llBranchMissPredictionsRetired),
  725. (DWORD)&((PP6_COUNTER_DATA)0)->llBranchMissPredictionsRetired
  726. },
  727. { // 58
  728. sizeof(PERF_COUNTER_DEFINITION),
  729. P6_CYCLES_INT_MASKED,
  730. 0,
  731. P6_CYCLES_INT_MASKED,
  732. 0,
  733. 0,
  734. PERF_DETAIL_WIZARD,
  735. PERF_COUNTER_BULK_COUNT,
  736. sizeof(((PP6_COUNTER_DATA)0)->llInterruptsMaskedCycles),
  737. (DWORD)&((PP6_COUNTER_DATA)0)->llInterruptsMaskedCycles
  738. },
  739. { // 59
  740. sizeof(PERF_COUNTER_DEFINITION),
  741. P6_CYCLES_INT_PENDING_AND_MASKED,
  742. 0,
  743. P6_CYCLES_INT_PENDING_AND_MASKED,
  744. 0,
  745. 0,
  746. PERF_DETAIL_WIZARD,
  747. PERF_COUNTER_BULK_COUNT,
  748. sizeof(((PP6_COUNTER_DATA)0)->llIntPendingWhileMaskedCycles),
  749. (DWORD)&((PP6_COUNTER_DATA)0)->llIntPendingWhileMaskedCycles
  750. },
  751. { // 60
  752. sizeof(PERF_COUNTER_DEFINITION),
  753. P6_HW_INT_RX,
  754. 0,
  755. P6_HW_INT_RX,
  756. 0,
  757. 0,
  758. PERF_DETAIL_WIZARD,
  759. PERF_COUNTER_BULK_COUNT,
  760. sizeof(((PP6_COUNTER_DATA)0)->llHardwareInterruptsReceived),
  761. (DWORD)&((PP6_COUNTER_DATA)0)->llHardwareInterruptsReceived
  762. },
  763. { // 61
  764. sizeof(PERF_COUNTER_DEFINITION),
  765. P6_BR_TAKEN_RETIRED,
  766. 0,
  767. P6_BR_TAKEN_RETIRED,
  768. 0,
  769. 0,
  770. PERF_DETAIL_WIZARD,
  771. PERF_COUNTER_BULK_COUNT,
  772. sizeof(((PP6_COUNTER_DATA)0)->llTakenBranchesRetired),
  773. (DWORD)&((PP6_COUNTER_DATA)0)->llTakenBranchesRetired
  774. },
  775. { // 62
  776. sizeof(PERF_COUNTER_DEFINITION),
  777. P6_BR_MISS_PRED_TAKEN_RET,
  778. 0,
  779. P6_BR_MISS_PRED_TAKEN_RET,
  780. 0,
  781. 0,
  782. PERF_DETAIL_WIZARD,
  783. PERF_COUNTER_BULK_COUNT,
  784. sizeof(((PP6_COUNTER_DATA)0)->llTakenBranchMissPredRetired),
  785. (DWORD)&((PP6_COUNTER_DATA)0)->llTakenBranchMissPredRetired
  786. },
  787. { // 63
  788. sizeof(PERF_COUNTER_DEFINITION),
  789. P6_INST_DECODED,
  790. 0,
  791. P6_INST_DECODED,
  792. 0,
  793. 0,
  794. PERF_DETAIL_WIZARD,
  795. PERF_COUNTER_BULK_COUNT,
  796. sizeof(((PP6_COUNTER_DATA)0)->llInstructionsDecoded),
  797. (DWORD)&((PP6_COUNTER_DATA)0)->llInstructionsDecoded
  798. },
  799. { // 64
  800. sizeof(PERF_COUNTER_DEFINITION),
  801. P6_PARTIAL_RAT_STALLS,
  802. 0,
  803. P6_PARTIAL_RAT_STALLS,
  804. 0,
  805. 0,
  806. PERF_DETAIL_WIZARD,
  807. PERF_COUNTER_BULK_COUNT,
  808. sizeof(((PP6_COUNTER_DATA)0)->llPartialRegisterStalls),
  809. (DWORD)&((PP6_COUNTER_DATA)0)->llPartialRegisterStalls
  810. },
  811. { // 65
  812. sizeof(PERF_COUNTER_DEFINITION),
  813. P6_BR_INST_DECODED,
  814. 0,
  815. P6_BR_INST_DECODED,
  816. 0,
  817. 0,
  818. PERF_DETAIL_WIZARD,
  819. PERF_COUNTER_BULK_COUNT,
  820. sizeof(((PP6_COUNTER_DATA)0)->llBranchesDecoded),
  821. (DWORD)&((PP6_COUNTER_DATA)0)->llBranchesDecoded
  822. },
  823. { // 66
  824. sizeof(PERF_COUNTER_DEFINITION),
  825. P6_BTB_MISSES,
  826. 0,
  827. P6_BTB_MISSES,
  828. 0,
  829. 0,
  830. PERF_DETAIL_WIZARD,
  831. PERF_COUNTER_BULK_COUNT,
  832. sizeof(((PP6_COUNTER_DATA)0)->llBTBMisses),
  833. (DWORD)&((PP6_COUNTER_DATA)0)->llBTBMisses
  834. },
  835. { // 67
  836. sizeof(PERF_COUNTER_DEFINITION),
  837. P6_BR_BOGUS,
  838. 0,
  839. P6_BR_BOGUS,
  840. 0,
  841. 0,
  842. PERF_DETAIL_WIZARD,
  843. PERF_COUNTER_BULK_COUNT,
  844. sizeof(((PP6_COUNTER_DATA)0)->llBogusBranches),
  845. (DWORD)&((PP6_COUNTER_DATA)0)->llBogusBranches
  846. },
  847. { // 68
  848. sizeof(PERF_COUNTER_DEFINITION),
  849. P6_BACLEARS,
  850. 0,
  851. P6_BACLEARS,
  852. 0,
  853. 0,
  854. PERF_DETAIL_WIZARD,
  855. PERF_COUNTER_BULK_COUNT,
  856. sizeof(((PP6_COUNTER_DATA)0)->llBACLEARSAsserted),
  857. (DWORD)&((PP6_COUNTER_DATA)0)->llBACLEARSAsserted
  858. }
  859. };
  860. // load look-up table that maps counter event ID to data field in the
  861. // perf data block
  862. //
  863. DWORD P6IndexToData[] = {
  864. /* 0x00 */ PENT_INDEX_NOT_USED,
  865. /* 0x01 */ PENT_INDEX_NOT_USED,
  866. /* 0x02 */ PENT_INDEX_NOT_USED,
  867. /* 0x03 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llStoreBufferBlocks),
  868. /* 0x04 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llStoreBufferDrainCycles),
  869. /* 0x05 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llMisalignedDataRef),
  870. /* 0x06 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llSegmentLoads),
  871. /* 0x07 */ PENT_INDEX_NOT_USED,
  872. /* 0x08 */ PENT_INDEX_NOT_USED,
  873. /* 0x09 */ PENT_INDEX_NOT_USED,
  874. /* 0x0a */ PENT_INDEX_NOT_USED,
  875. /* 0x0b */ PENT_INDEX_NOT_USED,
  876. /* 0x0c */ PENT_INDEX_NOT_USED,
  877. /* 0x0d */ PENT_INDEX_NOT_USED,
  878. /* 0x0e */ PENT_INDEX_NOT_USED,
  879. /* 0x0f */ PENT_INDEX_NOT_USED,
  880. /* 0x10 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llFLOPSExecuted),
  881. /* 0x11 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llMicrocodeFPExceptions),
  882. /* 0x12 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llMultiplies),
  883. /* 0x13 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llDivides),
  884. /* 0x14 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llDividerBusyCycles),
  885. /* 0x15 */ PENT_INDEX_NOT_USED,
  886. /* 0x16 */ PENT_INDEX_NOT_USED,
  887. /* 0x17 */ PENT_INDEX_NOT_USED,
  888. /* 0x18 */ PENT_INDEX_NOT_USED,
  889. /* 0x19 */ PENT_INDEX_NOT_USED,
  890. /* 0x1a */ PENT_INDEX_NOT_USED,
  891. /* 0x1b */ PENT_INDEX_NOT_USED,
  892. /* 0x1c */ PENT_INDEX_NOT_USED,
  893. /* 0x1d */ PENT_INDEX_NOT_USED,
  894. /* 0x1e */ PENT_INDEX_NOT_USED,
  895. /* 0x1f */ PENT_INDEX_NOT_USED,
  896. /* 0x20 */ PENT_INDEX_NOT_USED,
  897. /* 0x21 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llL2AddressStrobes),
  898. /* 0x22 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llL2DataBusBusyCycles),
  899. /* 0x23 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llL2DataBusToCpuBusyCycles),
  900. /* 0x24 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llL2LinesAllocated),
  901. /* 0x25 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llL2LinesMState),
  902. /* 0x26 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llL2LinesRemoved),
  903. /* 0x27 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llL2LinesMStateRemoved),
  904. /* 0x28 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llL2InstructionFetches),
  905. /* 0x29 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llL2DataLoads),
  906. /* 0x2a */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llL2DataStores),
  907. /* 0x2b */ PENT_INDEX_NOT_USED,
  908. /* 0x2c */ PENT_INDEX_NOT_USED,
  909. /* 0x2d */ PENT_INDEX_NOT_USED,
  910. /* 0x2e */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llL2Requests),
  911. /* 0x2f */ PENT_INDEX_NOT_USED,
  912. /* 0x30 */ PENT_INDEX_NOT_USED,
  913. /* 0x31 */ PENT_INDEX_NOT_USED,
  914. /* 0x32 */ PENT_INDEX_NOT_USED,
  915. /* 0x33 */ PENT_INDEX_NOT_USED,
  916. /* 0x34 */ PENT_INDEX_NOT_USED,
  917. /* 0x35 */ PENT_INDEX_NOT_USED,
  918. /* 0x36 */ PENT_INDEX_NOT_USED,
  919. /* 0x37 */ PENT_INDEX_NOT_USED,
  920. /* 0x38 */ PENT_INDEX_NOT_USED,
  921. /* 0x39 */ PENT_INDEX_NOT_USED,
  922. /* 0x3a */ PENT_INDEX_NOT_USED,
  923. /* 0x3b */ PENT_INDEX_NOT_USED,
  924. /* 0x3c */ PENT_INDEX_NOT_USED,
  925. /* 0x3d */ PENT_INDEX_NOT_USED,
  926. /* 0x3e */ PENT_INDEX_NOT_USED,
  927. /* 0x3f */ PENT_INDEX_NOT_USED,
  928. /* 0x40 */ PENT_INDEX_NOT_USED,
  929. /* 0x41 */ PENT_INDEX_NOT_USED,
  930. /* 0x42 */ PENT_INDEX_NOT_USED,
  931. /* 0x43 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llDataMemoryReferences),
  932. /* 0x44 */ PENT_INDEX_NOT_USED,
  933. /* 0x45 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llDCULinesAllocated),
  934. /* 0x46 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llDCUMStateLinesAllocated),
  935. /* 0x47 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llDCUMStateLinesEvicted),
  936. /* 0x48 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llWeightedDCUMissesOutstd),
  937. /* 0x49 */ PENT_INDEX_NOT_USED,
  938. /* 0x4a */ PENT_INDEX_NOT_USED,
  939. /* 0x4b */ PENT_INDEX_NOT_USED,
  940. /* 0x4c */ PENT_INDEX_NOT_USED,
  941. /* 0x4d */ PENT_INDEX_NOT_USED,
  942. /* 0x4e */ PENT_INDEX_NOT_USED,
  943. /* 0x4f */ PENT_INDEX_NOT_USED,
  944. /* 0x50 */ PENT_INDEX_NOT_USED,
  945. /* 0x51 */ PENT_INDEX_NOT_USED,
  946. /* 0x52 */ PENT_INDEX_NOT_USED,
  947. /* 0x53 */ PENT_INDEX_NOT_USED,
  948. /* 0x54 */ PENT_INDEX_NOT_USED,
  949. /* 0x55 */ PENT_INDEX_NOT_USED,
  950. /* 0x56 */ PENT_INDEX_NOT_USED,
  951. /* 0x57 */ PENT_INDEX_NOT_USED,
  952. /* 0x58 */ PENT_INDEX_NOT_USED,
  953. /* 0x59 */ PENT_INDEX_NOT_USED,
  954. /* 0x5a */ PENT_INDEX_NOT_USED,
  955. /* 0x5b */ PENT_INDEX_NOT_USED,
  956. /* 0x5c */ PENT_INDEX_NOT_USED,
  957. /* 0x5d */ PENT_INDEX_NOT_USED,
  958. /* 0x5e */ PENT_INDEX_NOT_USED,
  959. /* 0x5f */ PENT_INDEX_NOT_USED,
  960. /* 0x60 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusRequestsOutstanding),
  961. /* 0x61 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusBNRPinDriveCycles),
  962. /* 0x62 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusDRDYAssertedClocks),
  963. /* 0x63 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusLockAssertedClocks),
  964. /* 0x64 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusClocksReceivingData),
  965. /* 0x65 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusBurstReadTransactions),
  966. /* 0x66 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusReadForOwnershipTrans),
  967. /* 0x67 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusWritebackTransactions),
  968. /* 0x68 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusInstructionFetches),
  969. /* 0x69 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusInvalidateTransactions),
  970. /* 0x6a */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusPartialWriteTransactions),
  971. /* 0x6b */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusPartialTransactions),
  972. /* 0x6c */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusIOTransactions),
  973. /* 0x6d */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusDeferredTransactions),
  974. /* 0x6e */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusBurstTransactions),
  975. /* 0x6f */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusMemoryTransactions),
  976. /* 0x70 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusAllTransactions),
  977. /* 0x71 */ PENT_INDEX_NOT_USED,
  978. /* 0x72 */ PENT_INDEX_NOT_USED,
  979. /* 0x73 */ PENT_INDEX_NOT_USED,
  980. /* 0x74 */ PENT_INDEX_NOT_USED,
  981. /* 0x75 */ PENT_INDEX_NOT_USED,
  982. /* 0x76 */ PENT_INDEX_NOT_USED,
  983. /* 0x77 */ PENT_INDEX_NOT_USED,
  984. /* 0x78 */ PENT_INDEX_NOT_USED,
  985. /* 0x79 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llCPUWasNotHaltedCycles),
  986. /* 0x7a */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusCPUDrivesHitCycles),
  987. /* 0x7b */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusCPUDrivesHITMCycles),
  988. /* 0x7c */ PENT_INDEX_NOT_USED,
  989. /* 0x7d */ PENT_INDEX_NOT_USED,
  990. /* 0x7e */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBusSnoopStalledCycles),
  991. /* 0x7f */ PENT_INDEX_NOT_USED,
  992. /* 0x80 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llInstructionFetches),
  993. /* 0x81 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llInstructionFetchMisses),
  994. /* 0x82 */ PENT_INDEX_NOT_USED,
  995. /* 0x83 */ PENT_INDEX_NOT_USED,
  996. /* 0x84 */ PENT_INDEX_NOT_USED,
  997. /* 0x85 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llInstructionTLBMisses),
  998. /* 0x86 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llInstructionFetcthStalledCycles),
  999. /* 0x87 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llInstructionLenDecoderStalledCycles),
  1000. /* 0x88 */ PENT_INDEX_NOT_USED,
  1001. /* 0x89 */ PENT_INDEX_NOT_USED,
  1002. /* 0x8a */ PENT_INDEX_NOT_USED,
  1003. /* 0x8b */ PENT_INDEX_NOT_USED,
  1004. /* 0x8c */ PENT_INDEX_NOT_USED,
  1005. /* 0x8d */ PENT_INDEX_NOT_USED,
  1006. /* 0x8e */ PENT_INDEX_NOT_USED,
  1007. /* 0x8f */ PENT_INDEX_NOT_USED,
  1008. /* 0x90 */ PENT_INDEX_NOT_USED,
  1009. /* 0x91 */ PENT_INDEX_NOT_USED,
  1010. /* 0x92 */ PENT_INDEX_NOT_USED,
  1011. /* 0x93 */ PENT_INDEX_NOT_USED,
  1012. /* 0x94 */ PENT_INDEX_NOT_USED,
  1013. /* 0x95 */ PENT_INDEX_NOT_USED,
  1014. /* 0x96 */ PENT_INDEX_NOT_USED,
  1015. /* 0x97 */ PENT_INDEX_NOT_USED,
  1016. /* 0x98 */ PENT_INDEX_NOT_USED,
  1017. /* 0x99 */ PENT_INDEX_NOT_USED,
  1018. /* 0x9a */ PENT_INDEX_NOT_USED,
  1019. /* 0x9b */ PENT_INDEX_NOT_USED,
  1020. /* 0x9c */ PENT_INDEX_NOT_USED,
  1021. /* 0x9d */ PENT_INDEX_NOT_USED,
  1022. /* 0x9e */ PENT_INDEX_NOT_USED,
  1023. /* 0x9f */ PENT_INDEX_NOT_USED,
  1024. /* 0xa0 */ PENT_INDEX_NOT_USED,
  1025. /* 0xa1 */ PENT_INDEX_NOT_USED,
  1026. /* 0xa2 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llResourceRelatedStalls),
  1027. /* 0xa3 */ PENT_INDEX_NOT_USED,
  1028. /* 0xa4 */ PENT_INDEX_NOT_USED,
  1029. /* 0xa5 */ PENT_INDEX_NOT_USED,
  1030. /* 0xa6 */ PENT_INDEX_NOT_USED,
  1031. /* 0xa7 */ PENT_INDEX_NOT_USED,
  1032. /* 0xa8 */ PENT_INDEX_NOT_USED,
  1033. /* 0xa9 */ PENT_INDEX_NOT_USED,
  1034. /* 0xaa */ PENT_INDEX_NOT_USED,
  1035. /* 0xab */ PENT_INDEX_NOT_USED,
  1036. /* 0xac */ PENT_INDEX_NOT_USED,
  1037. /* 0xad */ PENT_INDEX_NOT_USED,
  1038. /* 0xae */ PENT_INDEX_NOT_USED,
  1039. /* 0xaf */ PENT_INDEX_NOT_USED,
  1040. /* 0xb0 */ PENT_INDEX_NOT_USED,
  1041. /* 0xb1 */ PENT_INDEX_NOT_USED,
  1042. /* 0xb2 */ PENT_INDEX_NOT_USED,
  1043. /* 0xb3 */ PENT_INDEX_NOT_USED,
  1044. /* 0xb4 */ PENT_INDEX_NOT_USED,
  1045. /* 0xb5 */ PENT_INDEX_NOT_USED,
  1046. /* 0xb6 */ PENT_INDEX_NOT_USED,
  1047. /* 0xb7 */ PENT_INDEX_NOT_USED,
  1048. /* 0xb8 */ PENT_INDEX_NOT_USED,
  1049. /* 0xb9 */ PENT_INDEX_NOT_USED,
  1050. /* 0xba */ PENT_INDEX_NOT_USED,
  1051. /* 0xbb */ PENT_INDEX_NOT_USED,
  1052. /* 0xbc */ PENT_INDEX_NOT_USED,
  1053. /* 0xbd */ PENT_INDEX_NOT_USED,
  1054. /* 0xbe */ PENT_INDEX_NOT_USED,
  1055. /* 0xbf */ PENT_INDEX_NOT_USED,
  1056. /* 0xc0 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llInstructionsRetired),
  1057. /* 0xc1 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llFPComputeOpersRetired),
  1058. /* 0xc2 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llUOPsRetired),
  1059. /* 0xc3 */ PENT_INDEX_NOT_USED,
  1060. /* 0xc4 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBranchesRetired),
  1061. /* 0xc5 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBranchMissPredictionsRetired),
  1062. /* 0xc6 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llInterruptsMaskedCycles),
  1063. /* 0xc7 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llIntPendingWhileMaskedCycles),
  1064. /* 0xc8 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llHardwareInterruptsReceived),
  1065. /* 0xc9 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llTakenBranchesRetired),
  1066. /* 0xca */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llTakenBranchMissPredRetired),
  1067. /* 0xcb */ PENT_INDEX_NOT_USED,
  1068. /* 0xcc */ PENT_INDEX_NOT_USED,
  1069. /* 0xcd */ PENT_INDEX_NOT_USED,
  1070. /* 0xce */ PENT_INDEX_NOT_USED,
  1071. /* 0xcf */ PENT_INDEX_NOT_USED,
  1072. /* 0xd0 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llInstructionsDecoded),
  1073. /* 0xd1 */ PENT_INDEX_NOT_USED,
  1074. /* 0xd2 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llPartialRegisterStalls),
  1075. /* 0xd3 */ PENT_INDEX_NOT_USED,
  1076. /* 0xd4 */ PENT_INDEX_NOT_USED,
  1077. /* 0xd5 */ PENT_INDEX_NOT_USED,
  1078. /* 0xd6 */ PENT_INDEX_NOT_USED,
  1079. /* 0xd7 */ PENT_INDEX_NOT_USED,
  1080. /* 0xd8 */ PENT_INDEX_NOT_USED,
  1081. /* 0xd9 */ PENT_INDEX_NOT_USED,
  1082. /* 0xda */ PENT_INDEX_NOT_USED,
  1083. /* 0xdb */ PENT_INDEX_NOT_USED,
  1084. /* 0xdc */ PENT_INDEX_NOT_USED,
  1085. /* 0xdd */ PENT_INDEX_NOT_USED,
  1086. /* 0xde */ PENT_INDEX_NOT_USED,
  1087. /* 0xdf */ PENT_INDEX_NOT_USED,
  1088. /* 0xe0 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBranchesDecoded),
  1089. /* 0xe1 */ PENT_INDEX_NOT_USED,
  1090. /* 0xe2 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBTBMisses),
  1091. /* 0xe3 */ PENT_INDEX_NOT_USED,
  1092. /* 0xe4 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBogusBranches),
  1093. /* 0xe5 */ PENT_INDEX_NOT_USED,
  1094. /* 0xe6 */ (DWORD)((LPBYTE)&((PP6_COUNTER_DATA)0)->llBACLEARSAsserted),
  1095. /* 0xe7 */ PENT_INDEX_NOT_USED,
  1096. /* 0xe8 */ PENT_INDEX_NOT_USED,
  1097. /* 0xe9 */ PENT_INDEX_NOT_USED,
  1098. /* 0xea */ PENT_INDEX_NOT_USED,
  1099. /* 0xeb */ PENT_INDEX_NOT_USED,
  1100. /* 0xec */ PENT_INDEX_NOT_USED,
  1101. /* 0xed */ PENT_INDEX_NOT_USED,
  1102. /* 0xee */ PENT_INDEX_NOT_USED,
  1103. /* 0xef */ PENT_INDEX_NOT_USED,
  1104. /* 0xf0 */ PENT_INDEX_NOT_USED,
  1105. /* 0xf1 */ PENT_INDEX_NOT_USED,
  1106. /* 0xf2 */ PENT_INDEX_NOT_USED,
  1107. /* 0xf3 */ PENT_INDEX_NOT_USED,
  1108. /* 0xf4 */ PENT_INDEX_NOT_USED,
  1109. /* 0xf5 */ PENT_INDEX_NOT_USED,
  1110. /* 0xf6 */ PENT_INDEX_NOT_USED,
  1111. /* 0xf7 */ PENT_INDEX_NOT_USED,
  1112. /* 0xf8 */ PENT_INDEX_NOT_USED,
  1113. /* 0xf9 */ PENT_INDEX_NOT_USED,
  1114. /* 0xfa */ PENT_INDEX_NOT_USED,
  1115. /* 0xfb */ PENT_INDEX_NOT_USED,
  1116. /* 0xfc */ PENT_INDEX_NOT_USED,
  1117. /* 0xfd */ PENT_INDEX_NOT_USED,
  1118. /* 0xfe */ PENT_INDEX_NOT_USED,
  1119. /* 0xff */ PENT_INDEX_NOT_USED
  1120. };
  1121. // define number of direct counters
  1122. DWORD P6IndexMax = sizeof(P6IndexToData) / sizeof(P6IndexToData[0]);