42#ifndef _PENTIUM4_EVENTS_H_
43#define _PENTIUM4_EVENTS_H_
54 .allowed_cccrs = { 0, 9, -1, },
58 .allowed_cccrs = { 0, 9, -1, },
62 .allowed_cccrs = { 0, 9, -1, },
64 {.name =
"ITLB_ESCR0",
66 .allowed_cccrs = { 0, 9, -1, },
70 .allowed_cccrs = { 0, 9, -1, },
74 .allowed_cccrs = { 0, 9, -1, },
78 .allowed_cccrs = { 0, 9, -1, },
82 .allowed_cccrs = { 0, 9, -1, },
86 .allowed_cccrs = { 2, 11, -1, },
90 .allowed_cccrs = { 2, 11, -1, },
92 {.name =
"TBPU_ESCR0",
94 .allowed_cccrs = { 2, 11, -1, },
96 {.name =
"FLAME_ESCR0",
98 .allowed_cccrs = { 4, 13, -1, },
100 {.name =
"FIRM_ESCR0",
102 .allowed_cccrs = { 4, 13, -1, },
104 {.name =
"SAAT_ESCR0",
106 .allowed_cccrs = { 4, 13, -1, },
108 {.name =
"U2L_ESCR0",
110 .allowed_cccrs = { 4, 13, -1, },
112 {.name =
"DAC_ESCR0",
114 .allowed_cccrs = { 4, 13, -1, },
118 .allowed_cccrs = { 6, 8, 15, },
120 {.name =
"ALF_ESCR0",
122 .allowed_cccrs = { 6, 8, 15, },
124 {.name =
"RAT_ESCR0",
126 .allowed_cccrs = { 6, 8, 15, },
128 {.name =
"SSU_ESCR0",
130 .allowed_cccrs = { 6, 8, 15, },
132 {.name =
"CRU_ESCR0",
134 .allowed_cccrs = { 6, 8, 15, },
136 {.name =
"CRU_ESCR2",
138 .allowed_cccrs = { 6, 8, 15, },
140 {.name =
"CRU_ESCR4",
142 .allowed_cccrs = { 6, 8, 15, },
144 {.name =
"BPU_ESCR1",
146 .allowed_cccrs = { 1, 10, -1, },
150 .allowed_cccrs = { 1, 10, -1, },
152 {.name =
"MOB_ESCR1",
154 .allowed_cccrs = { 1, 10, -1, },
156 {.name =
"ITLB_ESCR1",
158 .allowed_cccrs = { 1, 10, -1, },
160 {.name =
"PMH_ESCR1",
162 .allowed_cccrs = { 1, 10, -1, },
166 .allowed_cccrs = { 1, 10, -1, },
168 {.name =
"FSB_ESCR1",
170 .allowed_cccrs = { 1, 10, -1, },
172 {.name =
"BSU_ESCR1",
174 .allowed_cccrs = { 1, 10, -1, },
178 .allowed_cccrs = { 3, 12, -1, },
182 .allowed_cccrs = { 3, 12, -1, },
184 {.name =
"TBPU_ESCR1",
186 .allowed_cccrs = { 3, 12, -1, },
188 {.name =
"FLAME_ESCR1",
190 .allowed_cccrs = { 5, 14, -1, },
192 {.name =
"FIRM_ESCR1",
194 .allowed_cccrs = { 5, 14, -1, },
196 {.name =
"SAAT_ESCR1",
198 .allowed_cccrs = { 5, 14, -1, },
200 {.name =
"U2L_ESCR1",
202 .allowed_cccrs = { 5, 14, -1, },
204 {.name =
"DAC_ESCR1",
206 .allowed_cccrs = { 5, 14, -1, },
210 .allowed_cccrs = { 7, 16, 17, },
212 {.name =
"ALF_ESCR1",
214 .allowed_cccrs = { 7, 16, 17, },
216 {.name =
"RAT_ESCR1",
218 .allowed_cccrs = { 7, 16, 17, },
220 {.name =
"CRU_ESCR1",
222 .allowed_cccrs = { 7, 16, 17, },
224 {.name =
"CRU_ESCR3",
226 .allowed_cccrs = { 7, 16, 17, },
228 {.name =
"CRU_ESCR5",
230 .allowed_cccrs = { 7, 16, 17, },
234#define PENTIUM4_NUM_ESCRS (sizeof(pentium4_escrs)/sizeof(pentium4_escrs[0]))
243 {.
name =
"BPU_CCCR0",
246 .allowed_escrs = { 0, 1, 2, 3, 4, 5, 6, 7 },
248 {.name =
"BPU_CCCR2",
251 .allowed_escrs = { 23, 24, 25, 26, 27, 28, 29, 30 },
256 .allowed_escrs = { 8, 9, 10, -1, -1, -1, -1, -1, },
261 .allowed_escrs = { 31, 32, 33, -1, -1, -1, -1, -1, },
263 {.name =
"FLAME_CCCR0",
266 .allowed_escrs = { 11, 12, 13, 14, -1, 15, -1, -1 },
268 {.name =
"FLAME_CCCR2",
271 .allowed_escrs = { 34, 35, 36, 37, -1, 38, -1, -1 },
276 .allowed_escrs = { 16, 17, 18, 19, 20, 21, 22, -1 },
281 .allowed_escrs = { 39, 40, 41, -1, 42, 43, 44, -1 },
286 .allowed_escrs = { 16, 17, 18, 19, 20, 21, 22, -1 },
288 {.name =
"BPU_CCCR1",
291 .allowed_escrs = { 0, 1, 2, 3, 4, 5, 6, 7 },
293 {.name =
"BPU_CCCR3",
296 .allowed_escrs = { 23, 24, 25, 26, 27, 28, 29, 30 },
301 .allowed_escrs = { 8, 9, 10, -1, -1, -1, -1, -1, },
306 .allowed_escrs = { 31, 32, 33, -1, -1, -1, -1, -1, },
308 {.name =
"FLAME_CCCR1",
311 .allowed_escrs = { 11, 12, 13, 14, -1, 15, -1, -1 },
313 {.name =
"FLAME_CCCR3",
316 .allowed_escrs = { 34, 35, 36, 37, -1, 38, -1, -1 },
321 .allowed_escrs = { 16, 17, 18, 19, 20, 21, 22, -1 },
326 .allowed_escrs = { 39, 40, 41, -1, 42, 43, 44, -1 },
331 .allowed_escrs = { 39, 40, 41, -1, 42, 43, 44, -1 },
335#define PENTIUM4_NUM_CCCRS (sizeof(pentium4_cccrs)/sizeof(pentium4_cccrs[0]))
337#define PENTIUM4_NUM_PMCS (PENTIUM4_NUM_CCCRS + PENTIUM4_NUM_ESCRS)
338#define PENTIUM4_NUM_PMDS PENTIUM4_NUM_CCCRS
339#define PENTIUM4_COUNTER_WIDTH 40
348 {.
name =
"BPU_ESCR0",
356 {.name =
"MOB_ESCR0",
360 {.name =
"ITLB_ESCR0",
364 {.name =
"PMH_ESCR0",
372 {.name =
"FSB_ESCR0",
376 {.name =
"BSU_ESCR0",
388 {.name =
"TBPU_ESCR0",
392 {.name =
"FLAME_ESCR0",
396 {.name =
"FIRM_ESCR0",
400 {.name =
"SAAT_ESCR0",
404 {.name =
"U2L_ESCR0",
408 {.name =
"DAC_ESCR0",
416 {.name =
"ALF_ESCR0",
420 {.name =
"RAT_ESCR0",
424 {.name =
"SSU_ESCR0",
428 {.name =
"CRU_ESCR0",
432 {.name =
"CRU_ESCR2",
436 {.name =
"CRU_ESCR4",
440 {.name =
"BPU_CCCR0",
444 {.name =
"BPU_CCCR2",
456 {.name =
"FLAME_CCCR0",
460 {.name =
"FLAME_CCCR2",
476 {.name =
"BPU_ESCR1",
484 {.name =
"MOB_ESCR1",
488 {.name =
"ITLB_ESCR1",
492 {.name =
"PMH_ESCR1",
500 {.name =
"FSB_ESCR1",
504 {.name =
"BSU_ESCR1",
516 {.name =
"TBPU_ESCR1",
520 {.name =
"FLAME_ESCR1",
524 {.name =
"FIRM_ESCR1",
528 {.name =
"SAAT_ESCR1",
532 {.name =
"U2L_ESCR1",
536 {.name =
"DAC_ESCR1",
544 {.name =
"ALF_ESCR1",
548 {.name =
"RAT_ESCR1",
552 {.name =
"CRU_ESCR1",
556 {.name =
"CRU_ESCR3",
560 {.name =
"CRU_ESCR5",
564 {.name =
"BPU_CCCR1",
568 {.name =
"BPU_CCCR3",
580 {.name =
"FLAME_CCCR1",
584 {.name =
"FLAME_CCCR3",
610 {.
name =
"TC_deliver_mode",
611 .desc =
"The duration (in clock cycles) of the operating modes of "
612 "the trace cache and decode engine in the processor package.",
615 .allowed_escrs = { 9, 32 },
618 .desc =
"Both logical CPUs in deliver mode.",
622 .desc =
"Logical CPU 0 in deliver mode and "
623 "logical CPU 1 in build mode.",
627 .desc =
"Logical CPU 0 in deliver mode and logical CPU 1 "
628 "either halted, under machine clear condition, or "
629 "transitioning to a long microcode flow.",
633 .desc =
"Logical CPU 0 in build mode and "
634 "logical CPU 1 is in deliver mode.",
638 .desc =
"Both logical CPUs in build mode.",
642 .desc =
"Logical CPU 0 in build mode and logical CPU 1 "
643 "either halted, under machine clear condition, or "
644 "transitioning to a long microcode flow.",
648 .desc =
"Logical CPU 0 either halted, under machine clear "
649 "condition, or transitioning to a long microcode "
650 "flow, and logical CPU 1 in deliver mode.",
654 .desc =
"Logical CPU 0 either halted, under machine clear "
655 "condition, or transitioning to a long microcode "
656 "flow, and logical CPU 1 in build mode.",
663 {.name =
"BPU_fetch_request",
664 .desc =
"Instruction fetch requests by the Branch Prediction Unit.",
667 .allowed_escrs = { 0, 23 },
670 .desc =
"Trace cache lookup miss.",
677 {.name =
"ITLB_reference",
678 .desc =
"Translations using the Instruction "
679 "Translation Look-Aside Buffer.",
680 .event_select = 0x18,
682 .allowed_escrs = { 3, 26 },
689 .desc =
"ITLB miss.",
693 .desc =
"Uncacheable ITLB hit.",
700 {.name =
"memory_cancel",
701 .desc =
"Canceling of various types of requests in the "
702 "Data cache Address Control unit (DAC).",
705 .allowed_escrs = { 15, 38 },
707 {.name =
"ST_RB_FULL",
708 .desc =
"Replayed because no store request "
709 "buffer is available.",
713 .desc =
"Conflicts due to 64K aliasing.",
720 {.name =
"memory_complete",
721 .desc =
"Completions of a load split, store split, "
722 "uncacheable (UC) split, or UC load.",
725 .allowed_escrs = { 13, 36 },
728 .desc =
"Load split completed, excluding UC/WC loads.",
732 .desc =
"Any split stores completed.",
739 {.name =
"load_port_replay",
740 .desc =
"Replayed events at the load port.",
743 .allowed_escrs = { 13, 36 },
746 .desc =
"Split load.",
753 {.name =
"store_port_replay",
754 .desc =
"Replayed events at the store port.",
757 .allowed_escrs = { 13, 36 },
760 .desc =
"Split store.",
767 {.name =
"MOB_load_replay",
768 .desc =
"Count of times the memory order buffer (MOB) "
769 "caused a load operation to be replayed.",
772 .allowed_escrs = { 2, 25 },
775 .desc =
"Replayed because of unknown store address.",
779 .desc =
"Replayed because of unknown store data.",
782 {.name =
"PARTIAL_DATA",
783 .desc =
"Replayed because of partially overlapped data "
784 "access between the load and store operations.",
787 {.name =
"UNALGN_ADDR",
788 .desc =
"Replayed because the lower 4 bits of the "
789 "linear address do not match between the "
790 "load and store operations.",
797 {.name =
"page_walk_type",
798 .desc =
"Page walks that the page miss handler (PMH) performs.",
801 .allowed_escrs = { 4, 27 },
804 .desc =
"Page walk for a data TLB miss (load or store)",
808 .desc =
"Page walk for an instruction TLB miss",
815 {.name =
"BSQ_cache_reference",
816 .desc =
"Cache references (2nd or 3rd level caches) as seen by the "
817 "bus unit. Read types include both load and RFO, and write "
818 "types include writebacks and evictions.",
821 .allowed_escrs = { 7, 30 },
823 {.name =
"RD_2ndL_HITS",
824 .desc =
"Read 2nd level cache hit Shared.",
827 {.name =
"RD_2ndL_HITE",
828 .desc =
"Read 2nd level cache hit Exclusive.",
831 {.name =
"RD_2ndL_HITM",
832 .desc =
"Read 2nd level cache hit Modified.",
835 {.name =
"RD_3rdL_HITS",
836 .desc =
"Read 3rd level cache hit Shared.",
839 {.name =
"RD_3rdL_HITE",
840 .desc =
"Read 3rd level cache hit Exclusive.",
843 {.name =
"RD_3rdL_HITM",
844 .desc =
"Read 3rd level cache hit Modified.",
847 {.name =
"RD_2ndL_MISS",
848 .desc =
"Read 2nd level cache miss.",
851 {.name =
"RD_3rdL_MISS",
852 .desc =
"Read 3rd level cache miss.",
855 {.name =
"WR_2ndL_MISS",
856 .desc =
"A writeback lookup from DAC misses the 2nd "
857 "level cache (unlikely to happen)",
864 {.name =
"IOQ_allocation",
865 .desc =
"Count of various types of transactions on the bus. A count "
866 "is generated each time a transaction is allocated into the "
867 "IOQ that matches the specified mask bits. An allocated entry "
868 "can be a sector (64 bytes) or a chunk of 8 bytes. Requests "
869 "are counted once per retry. All 'TYPE_BIT*' event-masks "
870 "together are treated as a single 5-bit value.",
873 .allowed_escrs = { 6, 29 },
875 {.name =
"TYPE_BIT0",
876 .desc =
"Bus request type (bit 0).",
879 {.name =
"TYPE_BIT1",
880 .desc =
"Bus request type (bit 1).",
883 {.name =
"TYPE_BIT2",
884 .desc =
"Bus request type (bit 2).",
887 {.name =
"TYPE_BIT3",
888 .desc =
"Bus request type (bit 3).",
891 {.name =
"TYPE_BIT4",
892 .desc =
"Bus request type (bit 4).",
896 .desc =
"Count read entries.",
899 {.name =
"ALL_WRITE",
900 .desc =
"Count write entries.",
904 .desc =
"Count UC memory access entries.",
908 .desc =
"Count WC memory access entries.",
912 .desc =
"Count write-through (WT) memory access entries.",
916 .desc =
"Count write-protected (WP) memory access entries.",
920 .desc =
"Count WB memory access entries.",
924 .desc =
"Count all store requests driven by processor, as "
925 "opposed to other processor or DMA.",
929 .desc =
"Count all requests driven by other "
930 "processors or DMA.",
934 .desc =
"Include HW and SW prefetch requests in the count.",
941 {.name =
"IOQ_active_entries",
942 .desc =
"Number of entries (clipped at 15) in the IOQ that are "
943 "active. An allocated entry can be a sector (64 bytes) "
944 "or a chunk of 8 bytes. This event must be programmed in "
945 "conjuction with IOQ_allocation. All 'TYPE_BIT*' event-masks "
946 "together are treated as a single 5-bit value.",
947 .event_select = 0x1A,
949 .allowed_escrs = { 29, -1 },
951 {.name =
"TYPE_BIT0",
952 .desc =
"Bus request type (bit 0).",
955 {.name =
"TYPE_BIT1",
956 .desc =
"Bus request type (bit 1).",
959 {.name =
"TYPE_BIT2",
960 .desc =
"Bus request type (bit 2).",
963 {.name =
"TYPE_BIT3",
964 .desc =
"Bus request type (bit 3).",
967 {.name =
"TYPE_BIT4",
968 .desc =
"Bus request type (bit 4).",
972 .desc =
"Count read entries.",
975 {.name =
"ALL_WRITE",
976 .desc =
"Count write entries.",
980 .desc =
"Count UC memory access entries.",
984 .desc =
"Count WC memory access entries.",
988 .desc =
"Count write-through (WT) memory access entries.",
992 .desc =
"Count write-protected (WP) memory access entries.",
996 .desc =
"Count WB memory access entries.",
1000 .desc =
"Count all store requests driven by processor, as "
1001 "opposed to other processor or DMA.",
1005 .desc =
"Count all requests driven by other "
1006 "processors or DMA.",
1009 {.name =
"PREFETCH",
1010 .desc =
"Include HW and SW prefetch requests in the count.",
1017 {.name =
"FSB_data_activity",
1018 .desc =
"Count of DRDY or DBSY events that "
1019 "occur on the front side bus.",
1020 .event_select = 0x17,
1022 .allowed_escrs = { 6, 29 },
1024 {.name =
"DRDY_DRV",
1025 .desc =
"Count when this processor drives data onto the bus. "
1026 "Includes writes and implicit writebacks.",
1029 {.name =
"DRDY_OWN",
1030 .desc =
"Count when this processor reads data from the bus. "
1031 "Includes loads and some PIC transactions. Count "
1032 "DRDY events that we drive. Count DRDY events sampled "
1036 {.name =
"DRDY_OTHER",
1037 .desc =
"Count when data is on the bus but not being sampled "
1038 "by the processor. It may or may not be driven by "
1042 {.name =
"DBSY_DRV",
1043 .desc =
"Count when this processor reserves the bus for use "
1044 "in the next bus cycle in order to drive data.",
1047 {.name =
"DBSY_OWN",
1048 .desc =
"Count when some agent reserves the bus for use in "
1049 "the next bus cycle to drive data that this processor "
1053 {.name =
"DBSY_OTHER",
1054 .desc =
"Count when some agent reserves the bus for use in "
1055 "the next bus cycle to drive data that this processor "
1056 "will NOT sample. It may or may not be being driven "
1057 "by this processor.",
1064 {.name =
"BSQ_allocation",
1065 .desc =
"Allocations in the Bus Sequence Unit (BSQ). The event mask "
1066 "bits consist of four sub-groups: request type, request "
1067 "length, memory type, and a sub-group consisting mostly of "
1068 "independent bits (5 through 10). Must specify a mask for "
1070 .event_select = 0x5,
1072 .allowed_escrs = { 7, -1 },
1074 {.name =
"REQ_TYPE0",
1075 .desc =
"Along with REQ_TYPE1, request type encodings are: "
1076 "0 - Read (excludes read invalidate), 1 - Read "
1077 "invalidate, 2 - Write (other than writebacks), 3 - "
1078 "Writeback (evicted from cache).",
1081 {.name =
"REQ_TYPE1",
1082 .desc =
"Along with REQ_TYPE0, request type encodings are: "
1083 "0 - Read (excludes read invalidate), 1 - Read "
1084 "invalidate, 2 - Write (other than writebacks), 3 - "
1085 "Writeback (evicted from cache).",
1088 {.name =
"REQ_LEN0",
1089 .desc =
"Along with REQ_LEN1, request length encodings are: "
1090 "0 - zero chunks, 1 - one chunk, 3 - eight chunks.",
1093 {.name =
"REQ_LEN1",
1094 .desc =
"Along with REQ_LEN0, request length encodings are: "
1095 "0 - zero chunks, 1 - one chunk, 3 - eight chunks.",
1098 {.name =
"REQ_IO_TYPE",
1099 .desc =
"Request type is input or output.",
1102 {.name =
"REQ_LOCK_TYPE",
1103 .desc =
"Request type is bus lock.",
1106 {.name =
"REQ_CACHE_TYPE",
1107 .desc =
"Request type is cacheable.",
1110 {.name =
"REQ_SPLIT_TYPE",
1111 .desc =
"Request type is a bus 8-byte chunk split across "
1112 "an 8-byte boundary.",
1115 {.name =
"REQ_DEM_TYPE",
1116 .desc =
"0: Request type is HW.SW prefetch. "
1117 "1: Request type is a demand.",
1120 {.name =
"REQ_ORD_TYPE",
1121 .desc =
"Request is an ordered type.",
1124 {.name =
"MEM_TYPE0",
1125 .desc =
"Along with MEM_TYPE1 and MEM_TYPE2, "
1126 "memory type encodings are: 0 - UC, "
1127 "1 - USWC, 4- WT, 5 - WP, 6 - WB",
1130 {.name =
"MEM_TYPE1",
1131 .desc =
"Along with MEM_TYPE0 and MEM_TYPE2, "
1132 "memory type encodings are: 0 - UC, "
1133 "1 - USWC, 4- WT, 5 - WP, 6 - WB",
1136 {.name =
"MEM_TYPE2",
1137 .desc =
"Along with MEM_TYPE0 and MEM_TYPE1, "
1138 "memory type encodings are: 0 - UC, "
1139 "1 - USWC, 4- WT, 5 - WP, 6 - WB",
1146 {.name =
"BSQ_active_entries",
1147 .desc =
"Number of BSQ entries (clipped at 15) currently active "
1148 "(valid) which meet the subevent mask criteria during "
1149 "allocation in the BSQ. Active request entries are allocated "
1150 "on the BSQ until de-allocated. De-allocation of an entry "
1151 "does not necessarily imply the request is filled. This "
1152 "event must be programmed in conjunction with BSQ_allocation.",
1153 .event_select = 0x6,
1155 .allowed_escrs = { 30, -1 },
1157 {.name =
"REQ_TYPE0",
1158 .desc =
"Along with REQ_TYPE1, request type encodings are: "
1159 "0 - Read (excludes read invalidate), 1 - Read "
1160 "invalidate, 2 - Write (other than writebacks), 3 - "
1161 "Writeback (evicted from cache).",
1164 {.name =
"REQ_TYPE1",
1165 .desc =
"Along with REQ_TYPE0, request type encodings are: "
1166 "0 - Read (excludes read invalidate), 1 - Read "
1167 "invalidate, 2 - Write (other than writebacks), 3 - "
1168 "Writeback (evicted from cache).",
1171 {.name =
"REQ_LEN0",
1172 .desc =
"Along with REQ_LEN1, request length encodings are: "
1173 "0 - zero chunks, 1 - one chunk, 3 - eight chunks.",
1176 {.name =
"REQ_LEN1",
1177 .desc =
"Along with REQ_LEN0, request length encodings are: "
1178 "0 - zero chunks, 1 - one chunk, 3 - eight chunks.",
1181 {.name =
"REQ_IO_TYPE",
1182 .desc =
"Request type is input or output.",
1185 {.name =
"REQ_LOCK_TYPE",
1186 .desc =
"Request type is bus lock.",
1189 {.name =
"REQ_CACHE_TYPE",
1190 .desc =
"Request type is cacheable.",
1193 {.name =
"REQ_SPLIT_TYPE",
1194 .desc =
"Request type is a bus 8-byte chunk split across "
1195 "an 8-byte boundary.",
1198 {.name =
"REQ_DEM_TYPE",
1199 .desc =
"0: Request type is HW.SW prefetch. "
1200 "1: Request type is a demand.",
1203 {.name =
"REQ_ORD_TYPE",
1204 .desc =
"Request is an ordered type.",
1207 {.name =
"MEM_TYPE0",
1208 .desc =
"Along with MEM_TYPE1 and MEM_TYPE2, "
1209 "memory type encodings are: 0 - UC, "
1210 "1 - USWC, 4- WT, 5 - WP, 6 - WB",
1213 {.name =
"MEM_TYPE1",
1214 .desc =
"Along with MEM_TYPE0 and MEM_TYPE2, "
1215 "memory type encodings are: 0 - UC, "
1216 "1 - USWC, 4- WT, 5 - WP, 6 - WB",
1219 {.name =
"MEM_TYPE2",
1220 .desc =
"Along with MEM_TYPE0 and MEM_TYPE1, "
1221 "memory type encodings are: 0 - UC, "
1222 "1 - USWC, 4- WT, 5 - WP, 6 - WB",
1229 {.name =
"SSE_input_assist",
1230 .desc =
"Number of times an assist is requested to handle problems "
1231 "with input operands for SSE/SSE2/SSE3 operations; most "
1232 "notably denormal source operands when the DAZ bit isn't set.",
1233 .event_select = 0x34,
1235 .allowed_escrs = { 12, 35 },
1238 .desc =
"Count assists for SSE/SSE2/SSE3 uops.",
1245 {.name =
"packed_SP_uop",
1246 .desc =
"Number of packed single-precision uops.",
1247 .event_select = 0x8,
1249 .allowed_escrs = { 12, 35 },
1252 .desc =
"Count all uops operating on packed "
1253 "single-precisions operands.",
1257 .desc =
"Tag this event with tag bit 0 "
1258 "for retirement counting with execution_event.",
1262 .desc =
"Tag this event with tag bit 1 "
1263 "for retirement counting with execution_event.",
1267 .desc =
"Tag this event with tag bit 2 "
1268 "for retirement counting with execution_event.",
1272 .desc =
"Tag this event with tag bit 3 "
1273 "for retirement counting with execution_event.",
1280 {.name =
"packed_DP_uop",
1281 .desc =
"Number of packed double-precision uops.",
1282 .event_select = 0xC,
1284 .allowed_escrs = { 12, 35 },
1287 .desc =
"Count all uops operating on packed "
1288 "double-precisions operands.",
1292 .desc =
"Tag this event with tag bit 0 "
1293 "for retirement counting with execution_event.",
1297 .desc =
"Tag this event with tag bit 1 "
1298 "for retirement counting with execution_event.",
1302 .desc =
"Tag this event with tag bit 2 "
1303 "for retirement counting with execution_event.",
1307 .desc =
"Tag this event with tag bit 3 "
1308 "for retirement counting with execution_event.",
1315 {.name =
"scalar_SP_uop",
1316 .desc =
"Number of scalar single-precision uops.",
1317 .event_select = 0xA,
1319 .allowed_escrs = { 12, 35 },
1322 .desc =
"Count all uops operating on scalar "
1323 "single-precisions operands.",
1327 .desc =
"Tag this event with tag bit 0 "
1328 "for retirement counting with execution_event.",
1332 .desc =
"Tag this event with tag bit 1 "
1333 "for retirement counting with execution_event.",
1337 .desc =
"Tag this event with tag bit 2 "
1338 "for retirement counting with execution_event.",
1342 .desc =
"Tag this event with tag bit 3 "
1343 "for retirement counting with execution_event.",
1350 {.name =
"scalar_DP_uop",
1351 .desc =
"Number of scalar double-precision uops.",
1352 .event_select = 0xE,
1354 .allowed_escrs = { 12, 35 },
1357 .desc =
"Count all uops operating on scalar "
1358 "double-precisions operands.",
1362 .desc =
"Tag this event with tag bit 0 "
1363 "for retirement counting with execution_event.",
1367 .desc =
"Tag this event with tag bit 1 "
1368 "for retirement counting with execution_event.",
1372 .desc =
"Tag this event with tag bit 2 "
1373 "for retirement counting with execution_event.",
1377 .desc =
"Tag this event with tag bit 3 "
1378 "for retirement counting with execution_event.",
1385 {.name =
"64bit_MMX_uop",
1386 .desc =
"Number of MMX instructions which "
1387 "operate on 64-bit SIMD operands.",
1388 .event_select = 0x2,
1390 .allowed_escrs = { 12, 35 },
1393 .desc =
"Count all uops operating on 64-bit SIMD integer "
1394 "operands in memory or MMX registers.",
1398 .desc =
"Tag this event with tag bit 0 "
1399 "for retirement counting with execution_event.",
1403 .desc =
"Tag this event with tag bit 1 "
1404 "for retirement counting with execution_event.",
1408 .desc =
"Tag this event with tag bit 2 "
1409 "for retirement counting with execution_event.",
1413 .desc =
"Tag this event with tag bit 3 "
1414 "for retirement counting with execution_event.",
1421 {.name =
"128bit_MMX_uop",
1422 .desc =
"Number of MMX instructions which "
1423 "operate on 128-bit SIMD operands.",
1424 .event_select = 0x1A,
1426 .allowed_escrs = { 12, 35 },
1429 .desc =
"Count all uops operating on 128-bit SIMD integer "
1430 "operands in memory or MMX registers.",
1434 .desc =
"Tag this event with tag bit 0 "
1435 "for retirement counting with execution_event.",
1439 .desc =
"Tag this event with tag bit 1 "
1440 "for retirement counting with execution_event.",
1444 .desc =
"Tag this event with tag bit 2 "
1445 "for retirement counting with execution_event.",
1449 .desc =
"Tag this event with tag bit 3 "
1450 "for retirement counting with execution_event.",
1457 {.name =
"x87_FP_uop",
1458 .desc =
"Number of x87 floating-point uops.",
1459 .event_select = 0x4,
1461 .allowed_escrs = { 12, 35 },
1464 .desc =
"Count all x87 FP uops.",
1468 .desc =
"Tag this event with tag bit 0 "
1469 "for retirement counting with execution_event.",
1473 .desc =
"Tag this event with tag bit 1 "
1474 "for retirement counting with execution_event.",
1478 .desc =
"Tag this event with tag bit 2 "
1479 "for retirement counting with execution_event.",
1483 .desc =
"Tag this event with tag bit 3 "
1484 "for retirement counting with execution_event.",
1492 .desc =
"Miscellaneous events detected by the TC. The counter will "
1493 "count twice for each occurrence.",
1494 .event_select = 0x6,
1496 .allowed_escrs = { 9, 32 },
1499 .desc =
"Number of flushes",
1506 {.name =
"global_power_events",
1507 .desc =
"Counts the time during which a processor is not stopped.",
1508 .event_select = 0x13,
1510 .allowed_escrs = { 6, 29 },
1513 .desc =
"The processor is active (includes the "
1514 "handling of HLT STPCLK and throttling.",
1521 {.name =
"tc_ms_xfer",
1522 .desc =
"Number of times that uop delivery changed from TC to MS ROM.",
1523 .event_select = 0x5,
1525 .allowed_escrs = { 8, 31 },
1528 .desc =
"A TC to MS transfer occurred.",
1535 {.name =
"uop_queue_writes",
1536 .desc =
"Number of valid uops written to the uop queue.",
1537 .event_select = 0x9,
1539 .allowed_escrs = { 8, 31 },
1541 {.name =
"FROM_TC_BUILD",
1542 .desc =
"The uops being written are from TC build mode.",
1545 {.name =
"FROM_TC_DELIVER",
1546 .desc =
"The uops being written are from TC deliver mode.",
1549 {.name =
"FROM_ROM",
1550 .desc =
"The uops being written are from microcode ROM.",
1557 {.name =
"retired_mispred_branch_type",
1558 .desc =
"Number of retiring mispredicted branches by type.",
1559 .event_select = 0x5,
1561 .allowed_escrs = { 10, 33 },
1563 {.name =
"CONDITIONAL",
1564 .desc =
"Conditional jumps.",
1568 .desc =
"Indirect call branches.",
1572 .desc =
"Return branches.",
1575 {.name =
"INDIRECT",
1576 .desc =
"Returns, indirect calls, or indirect jumps.",
1583 {.name =
"retired_branch_type",
1584 .desc =
"Number of retiring branches by type.",
1585 .event_select = 0x4,
1587 .allowed_escrs = { 10, 33 },
1589 {.name =
"CONDITIONAL",
1590 .desc =
"Conditional jumps.",
1594 .desc =
"Indirect call branches.",
1598 .desc =
"Return branches.",
1601 {.name =
"INDIRECT",
1602 .desc =
"Returns, indirect calls, or indirect jumps.",
1609 {.name =
"resource_stall",
1610 .desc =
"Occurrences of latency or stalls in the Allocator.",
1611 .event_select = 0x1,
1613 .allowed_escrs = { 17, 40 },
1616 .desc =
"A stall due to lack of store buffers.",
1623 {.name =
"WC_Buffer",
1624 .desc =
"Number of Write Combining Buffer operations.",
1625 .event_select = 0x5,
1627 .allowed_escrs = { 15, 38 },
1629 {.name =
"WCB_EVICTS",
1630 .desc =
"WC Buffer evictions of all causes.",
1633 {.name =
"WCB_FULL_EVICT",
1634 .desc =
"WC Buffer eviction; no WC buffer is available.",
1641 {.name =
"b2b_cycles",
1642 .desc =
"Number of back-to-back bus cycles",
1643 .event_select = 0x16,
1645 .allowed_escrs = { 6, 29 },
1657 .desc =
"Number of bus-not-ready conditions.",
1658 .event_select = 0x8,
1660 .allowed_escrs = { 6, 29 },
1673 .desc =
"Number of snoop hit modified bus traffic.",
1674 .event_select = 0x6,
1676 .allowed_escrs = { 6, 29 },
1688 {.name =
"response",
1689 .desc =
"Count of different types of responses.",
1690 .event_select = 0x4,
1692 .allowed_escrs = { 6, 29 },
1704 {.name =
"front_end_event",
1705 .desc =
"Number of retirements of tagged uops which are specified "
1706 "through the front-end tagging mechanism.",
1707 .event_select = 0x8,
1709 .allowed_escrs = { 21, 43 },
1712 .desc =
"The marked uops are not bogus.",
1716 .desc =
"The marked uops are bogus.",
1723 {.name =
"execution_event",
1724 .desc =
"Number of retirements of tagged uops which are specified "
1725 "through the execution tagging mechanism. The event-mask "
1726 "allows from one to four types of uops to be tagged.",
1727 .event_select = 0xC,
1729 .allowed_escrs = { 21, 43 },
1732 .desc =
"The marked uops are not bogus.",
1736 .desc =
"The marked uops are not bogus.",
1740 .desc =
"The marked uops are not bogus.",
1744 .desc =
"The marked uops are not bogus.",
1748 .desc =
"The marked uops are bogus.",
1752 .desc =
"The marked uops are bogus.",
1756 .desc =
"The marked uops are bogus.",
1760 .desc =
"The marked uops are bogus.",
1767 {.name =
"replay_event",
1768 .desc =
"Number of retirements of tagged uops which are specified "
1769 "through the replay tagging mechanism.",
1770 .event_select = 0x9,
1772 .allowed_escrs = { 21, 43 },
1775 .desc =
"The marked uops are not bogus.",
1779 .desc =
"The marked uops are bogus.",
1782 {.name =
"L1_LD_MISS",
1783 .desc =
"Virtual mask for L1 cache load miss replays.",
1786 {.name =
"L2_LD_MISS",
1787 .desc =
"Virtual mask for L2 cache load miss replays.",
1790 {.name =
"DTLB_LD_MISS",
1791 .desc =
"Virtual mask for DTLB load miss replays.",
1794 {.name =
"DTLB_ST_MISS",
1795 .desc =
"Virtual mask for DTLB store miss replays.",
1798 {.name =
"DTLB_ALL_MISS",
1799 .desc =
"Virtual mask for all DTLB miss replays.",
1803 .desc =
"Virtual mask for tagged mispredicted branch replays.",
1806 {.name =
"MOB_LD_REPLAY",
1807 .desc =
"Virtual mask for MOB load replays.",
1810 {.name =
"SP_LD_RET",
1811 .desc =
"Virtual mask for split load replays. Use with load_port_replay event.",
1814 {.name =
"SP_ST_RET",
1815 .desc =
"Virtual mask for split store replays. Use with store_port_replay event.",
1822 {.name =
"instr_retired",
1823 .desc =
"Number of instructions retired during a clock cycle.",
1824 .event_select = 0x2,
1826 .allowed_escrs = { 20, 42 },
1828 {.name =
"NBOGUSNTAG",
1829 .desc =
"Non-bogus instructions that are not tagged.",
1832 {.name =
"NBOGUSTAG",
1833 .desc =
"Non-bogus instructions that are tagged.",
1836 {.name =
"BOGUSNTAG",
1837 .desc =
"Bogus instructions that are not tagged.",
1840 {.name =
"BOGUSTAG",
1841 .desc =
"Bogus instructions that are tagged.",
1848 {.name =
"uops_retired",
1849 .desc =
"Number of uops retired during a clock cycle.",
1850 .event_select = 0x1,
1852 .allowed_escrs = { 20, 42 },
1855 .desc =
"The marked uops are not bogus.",
1859 .desc =
"The marked uops are bogus.",
1866 {.name =
"uops_type",
1867 .desc =
"This event is used in conjunction with with the front-end "
1868 "mechanism to tag load and store uops.",
1869 .event_select = 0x2,
1871 .allowed_escrs = { 18, 41 },
1873 {.name =
"TAGLOADS",
1874 .desc =
"The uop is a load operation.",
1877 {.name =
"TAGSTORES",
1878 .desc =
"The uop is a store operation.",
1885 {.name =
"branch_retired",
1886 .desc =
"Number of retirements of a branch.",
1887 .event_select = 0x6,
1889 .allowed_escrs = { 21, 43 },
1892 .desc =
"Branch not-taken predicted.",
1896 .desc =
"Branch not-taken mispredicted.",
1900 .desc =
"Branch taken predicted.",
1904 .desc =
"Branch taken mispredicted.",
1911 {.name =
"mispred_branch_retired",
1912 .desc =
"Number of retirements of mispredicted "
1913 "IA-32 branch instructions",
1914 .event_select = 0x3,
1916 .allowed_escrs = { 20, 42 },
1919 .desc =
"The retired instruction is not bogus.",
1926 {.name =
"x87_assist",
1927 .desc =
"Number of retirements of x87 instructions that required "
1928 "special handling.",
1929 .event_select = 0x3,
1931 .allowed_escrs = { 21, 43 },
1934 .desc =
"Handle FP stack underflow.",
1938 .desc =
"Handle FP stack overflow.",
1942 .desc =
"Handle x87 output overflow.",
1946 .desc =
"Handle x87 output underflow.",
1950 .desc =
"Handle x87 input assist.",
1957 {.name =
"machine_clear",
1958 .desc =
"Number of occurances when the entire "
1959 "pipeline of the machine is cleared.",
1960 .event_select = 0x2,
1962 .allowed_escrs = { 21, 43 },
1965 .desc =
"Counts for a portion of the many cycles while the "
1966 "machine is cleared for any cause. Use edge-"
1967 "triggering for this bit only to get a count of "
1968 "occurances versus a duration.",
1972 .desc =
"Increments each time the machine is cleared due to "
1973 "memory ordering issues.",
1977 .desc =
"Increments each time the machine is cleared due to "
1978 "self-modifying code issues.",
1985 {.name =
"instr_completed",
1986 .desc =
"Instructions that have completed and "
1987 "retired during a clock cycle. Supported on models 3, 4, 6 only",
1988 .event_select = 0x7,
1990 .allowed_escrs = { 21, 42 },
1993 .desc =
"Non-bogus instructions.",
1997 .desc =
"Bogus instructions.",
2003#define PME_INSTR_COMPLETED 45
2004#define PME_REPLAY_EVENT 37
2005#define PENTIUM4_EVENT_COUNT (sizeof(pentium4_events)/sizeof(pentium4_events[0]))
2010#define PENTIUM4_CPU_CLK_UNHALTED 24
2011#define PENTIUM4_INST_RETIRED 38
pentium4_escr_reg_t pentium4_escrs[]
pentium4_cccr_reg_t pentium4_cccrs[]
pentium4_event_t pentium4_events[]
pentium4_pmc_t pentium4_pmcs[PENTIUM4_NUM_PMCS]
#define PENTIUM4_NUM_PMCS
#define PENTIUM4_PMC_TYPE_CCCR
#define PENTIUM4_PMC_TYPE_ESCR