1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Exegesis Tables *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9
10static const char *X86PfmCounterNames[] = {
11 "BRANCH-MISSES", // 0
12 "DTLB-LOAD-MISSES", // 1
13 "DTLB_LOAD_MISSES:MISS_CAUSES_A_WALK", // 2
14 "DTLB_STORE_MISSES:MISS_CAUSES_A_WALK", // 3
15 "INSTRUCTIONS_RETIRED", // 4
16 "ITLB-LOAD-MISSES", // 5
17 "ITLB_MISSES:MISS_CAUSES_A_WALK", // 6
18 "L1-DCACHE-LOAD-MISSES", // 7
19 "L1-DCACHE-STORE-MISSES", // 8
20 "L1-ICACHE-LOAD-MISSES", // 9
21 "MEM_LOAD_UOPS_RETIRED:L1_MISS", // 10
22 "RETIRED_INSTRUCTIONS", // 11
23 "cpu_clk_unhalted", // 12
24 "cycles_not_in_halt", // 13
25 "dispatched_fpu:pipe0", // 14
26 "dispatched_fpu:pipe1", // 15
27 "dispatched_fpu_ops:ops_pipe0 + dispatched_fpu_ops:ops_dual_pipe0", // 16
28 "dispatched_fpu_ops:ops_pipe1 + dispatched_fpu_ops:ops_dual_pipe1", // 17
29 "dispatched_fpu_ops:ops_pipe2 + dispatched_fpu_ops:ops_dual_pipe2", // 18
30 "dispatched_fpu_ops:ops_pipe3 + dispatched_fpu_ops:ops_dual_pipe3", // 19
31 "div_op_count", // 20
32 "fpu_pipe_assignment:total0", // 21
33 "fpu_pipe_assignment:total1", // 22
34 "fpu_pipe_assignment:total2", // 23
35 "fpu_pipe_assignment:total3", // 24
36 "ls_dispatch:ld_dispatch", // 25
37 "ls_dispatch:ld_st_dispatch + ls_dispatch:ld_dispatch + ls_dispatch:store_dispatch", // 26
38 "ls_dispatch:store_dispatch", // 27
39 "mem_uop_retired:any_ld + mem_uop_retired:any_st", // 28
40 "ops_type_dispatched_from_decoder:fp_disp_retire_mode", // 29
41 "ops_type_dispatched_from_decoder:int_disp_retire_mode", // 30
42 "retired_ops", // 31
43 "retired_uops", // 32
44 "rs_uops_dispatched_cycles:port_0", // 33
45 "rs_uops_dispatched_cycles:port_1", // 34
46 "rs_uops_dispatched_cycles:port_2 + rs_uops_dispatched_cycles:port_3", // 35
47 "rs_uops_dispatched_cycles:port_4", // 36
48 "rs_uops_dispatched_cycles:port_5", // 37
49 "unhalted_core_cycles", // 38
50 "uops_dispatched:alu", // 39
51 "uops_dispatched:int_eu_all", // 40
52 "uops_dispatched:jmp", // 41
53 "uops_dispatched:load", // 42
54 "uops_dispatched:port_0", // 43
55 "uops_dispatched:port_1", // 44
56 "uops_dispatched:port_2_3", // 45
57 "uops_dispatched:port_2_3_10", // 46
58 "uops_dispatched:port_4_9", // 47
59 "uops_dispatched:port_5", // 48
60 "uops_dispatched:port_5_11", // 49
61 "uops_dispatched:port_6", // 50
62 "uops_dispatched:port_7_8", // 51
63 "uops_dispatched:shift", // 52
64 "uops_dispatched:sta", // 53
65 "uops_dispatched:std", // 54
66 "uops_dispatched_port:port_0", // 55
67 "uops_dispatched_port:port_1", // 56
68 "uops_dispatched_port:port_2", // 57
69 "uops_dispatched_port:port_2 + uops_dispatched_port:port_3", // 58
70 "uops_dispatched_port:port_3", // 59
71 "uops_dispatched_port:port_4", // 60
72 "uops_dispatched_port:port_5", // 61
73 "uops_dispatched_port:port_6", // 62
74 "uops_dispatched_port:port_7", // 63
75 "uops_executed:port0", // 64
76 "uops_executed:port1", // 65
77 "uops_executed:port2_core + uops_executed:port3_core", // 66
78 "uops_executed:port4_core", // 67
79 "uops_executed:port5", // 68
80 "uops_executed_port:port_0", // 69
81 "uops_executed_port:port_1", // 70
82 "uops_executed_port:port_2", // 71
83 "uops_executed_port:port_3", // 72
84 "uops_executed_port:port_4", // 73
85 "uops_executed_port:port_5", // 74
86 "uops_executed_port:port_6", // 75
87 "uops_executed_port:port_7", // 76
88 "uops_issued:any", // 77
89 "uops_retired", // 78
90 "uops_retired:all", // 79
91 "uops_retired:any", // 80
92};
93
94static const PfmCountersInfo::IssueCounter X86PfmIssueCounters[] = {
95 { .Counter: X86PfmCounterNames[43], .ProcResName: "ADLPPort00"},
96 { .Counter: X86PfmCounterNames[44], .ProcResName: "ADLPPort01"},
97 { .Counter: X86PfmCounterNames[46], .ProcResName: "ADLPPort02_03_10"},
98 { .Counter: X86PfmCounterNames[47], .ProcResName: "ADLPPort04_09"},
99 { .Counter: X86PfmCounterNames[49], .ProcResName: "ADLPPort05_11"},
100 { .Counter: X86PfmCounterNames[50], .ProcResName: "ADLPPort06"},
101 { .Counter: X86PfmCounterNames[51], .ProcResName: "ADLPPort07_08"},
102 { .Counter: X86PfmCounterNames[16], .ProcResName: "PdFPU0"},
103 { .Counter: X86PfmCounterNames[17], .ProcResName: "PdFPU1"},
104 { .Counter: X86PfmCounterNames[18], .ProcResName: "PdFPU2"},
105 { .Counter: X86PfmCounterNames[19], .ProcResName: "PdFPU3"},
106 { .Counter: X86PfmCounterNames[16], .ProcResName: "SrFPU0"},
107 { .Counter: X86PfmCounterNames[17], .ProcResName: "SrFPU1"},
108 { .Counter: X86PfmCounterNames[18], .ProcResName: "SrFPU2"},
109 { .Counter: X86PfmCounterNames[69], .ProcResName: "BWPort0"},
110 { .Counter: X86PfmCounterNames[70], .ProcResName: "BWPort1"},
111 { .Counter: X86PfmCounterNames[71], .ProcResName: "BWPort2"},
112 { .Counter: X86PfmCounterNames[72], .ProcResName: "BWPort3"},
113 { .Counter: X86PfmCounterNames[73], .ProcResName: "BWPort4"},
114 { .Counter: X86PfmCounterNames[74], .ProcResName: "BWPort5"},
115 { .Counter: X86PfmCounterNames[75], .ProcResName: "BWPort6"},
116 { .Counter: X86PfmCounterNames[76], .ProcResName: "BWPort7"},
117 { .Counter: X86PfmCounterNames[14], .ProcResName: "BtFPU0"},
118 { .Counter: X86PfmCounterNames[15], .ProcResName: "BtFPU1"},
119 { .Counter: X86PfmCounterNames[14], .ProcResName: "JFPU0"},
120 { .Counter: X86PfmCounterNames[15], .ProcResName: "JFPU1"},
121 { .Counter: X86PfmCounterNames[33], .ProcResName: "SBPort0"},
122 { .Counter: X86PfmCounterNames[34], .ProcResName: "SBPort1"},
123 { .Counter: X86PfmCounterNames[35], .ProcResName: "SBPort23"},
124 { .Counter: X86PfmCounterNames[36], .ProcResName: "SBPort4"},
125 { .Counter: X86PfmCounterNames[37], .ProcResName: "SBPort5"},
126 { .Counter: X86PfmCounterNames[69], .ProcResName: "HWPort0"},
127 { .Counter: X86PfmCounterNames[70], .ProcResName: "HWPort1"},
128 { .Counter: X86PfmCounterNames[71], .ProcResName: "HWPort2"},
129 { .Counter: X86PfmCounterNames[72], .ProcResName: "HWPort3"},
130 { .Counter: X86PfmCounterNames[73], .ProcResName: "HWPort4"},
131 { .Counter: X86PfmCounterNames[74], .ProcResName: "HWPort5"},
132 { .Counter: X86PfmCounterNames[75], .ProcResName: "HWPort6"},
133 { .Counter: X86PfmCounterNames[76], .ProcResName: "HWPort7"},
134 { .Counter: X86PfmCounterNames[43], .ProcResName: "ICXPort0"},
135 { .Counter: X86PfmCounterNames[44], .ProcResName: "ICXPort1"},
136 { .Counter: X86PfmCounterNames[45], .ProcResName: "ICXPort23"},
137 { .Counter: X86PfmCounterNames[47], .ProcResName: "ICXPort49"},
138 { .Counter: X86PfmCounterNames[48], .ProcResName: "ICXPort5"},
139 { .Counter: X86PfmCounterNames[50], .ProcResName: "ICXPort6"},
140 { .Counter: X86PfmCounterNames[51], .ProcResName: "ICXPort78"},
141 { .Counter: X86PfmCounterNames[39], .ProcResName: "LNLPVPort02_03"},
142 { .Counter: X86PfmCounterNames[40], .ProcResName: "LNLPPort00_01_02_03_04_05"},
143 { .Counter: X86PfmCounterNames[41], .ProcResName: "LNLPPort00_02_04"},
144 { .Counter: X86PfmCounterNames[42], .ProcResName: "LNLPPort20_21_22"},
145 { .Counter: X86PfmCounterNames[52], .ProcResName: "LNLPPort01_03_05"},
146 { .Counter: X86PfmCounterNames[53], .ProcResName: "LNLPPort25_26_27"},
147 { .Counter: X86PfmCounterNames[54], .ProcResName: "LNLPPort10_11"},
148 { .Counter: X86PfmCounterNames[64], .ProcResName: "SBPort0"},
149 { .Counter: X86PfmCounterNames[65], .ProcResName: "SBPort1"},
150 { .Counter: X86PfmCounterNames[66], .ProcResName: "SBPort23"},
151 { .Counter: X86PfmCounterNames[67], .ProcResName: "SBPort4"},
152 { .Counter: X86PfmCounterNames[68], .ProcResName: "SBPort5"},
153 { .Counter: X86PfmCounterNames[28], .ProcResName: "SLM_MEC_RSV"},
154 { .Counter: X86PfmCounterNames[55], .ProcResName: "SBPort0"},
155 { .Counter: X86PfmCounterNames[56], .ProcResName: "SBPort1"},
156 { .Counter: X86PfmCounterNames[58], .ProcResName: "SBPort23"},
157 { .Counter: X86PfmCounterNames[60], .ProcResName: "SBPort4"},
158 { .Counter: X86PfmCounterNames[61], .ProcResName: "SBPort5"},
159 { .Counter: X86PfmCounterNames[43], .ProcResName: "SPRPort00"},
160 { .Counter: X86PfmCounterNames[44], .ProcResName: "SPRPort01"},
161 { .Counter: X86PfmCounterNames[46], .ProcResName: "SPRPort02_03_10"},
162 { .Counter: X86PfmCounterNames[47], .ProcResName: "SPRPort04_09"},
163 { .Counter: X86PfmCounterNames[49], .ProcResName: "SPRPort05_11"},
164 { .Counter: X86PfmCounterNames[50], .ProcResName: "SPRPort06"},
165 { .Counter: X86PfmCounterNames[51], .ProcResName: "SPRPort07_08"},
166 { .Counter: X86PfmCounterNames[55], .ProcResName: "SKLPort0"},
167 { .Counter: X86PfmCounterNames[56], .ProcResName: "SKLPort1"},
168 { .Counter: X86PfmCounterNames[57], .ProcResName: "SKLPort2"},
169 { .Counter: X86PfmCounterNames[59], .ProcResName: "SKLPort3"},
170 { .Counter: X86PfmCounterNames[60], .ProcResName: "SKLPort4"},
171 { .Counter: X86PfmCounterNames[61], .ProcResName: "SKLPort5"},
172 { .Counter: X86PfmCounterNames[62], .ProcResName: "SKLPort6"},
173 { .Counter: X86PfmCounterNames[63], .ProcResName: "SKLPort7"},
174 { .Counter: X86PfmCounterNames[55], .ProcResName: "SKXPort0"},
175 { .Counter: X86PfmCounterNames[56], .ProcResName: "SKXPort1"},
176 { .Counter: X86PfmCounterNames[57], .ProcResName: "SKXPort2"},
177 { .Counter: X86PfmCounterNames[59], .ProcResName: "SKXPort3"},
178 { .Counter: X86PfmCounterNames[60], .ProcResName: "SKXPort4"},
179 { .Counter: X86PfmCounterNames[61], .ProcResName: "SKXPort5"},
180 { .Counter: X86PfmCounterNames[62], .ProcResName: "SKXPort6"},
181 { .Counter: X86PfmCounterNames[63], .ProcResName: "SKXPort7"},
182 { .Counter: X86PfmCounterNames[21], .ProcResName: "ZnFPU0"},
183 { .Counter: X86PfmCounterNames[22], .ProcResName: "ZnFPU1"},
184 { .Counter: X86PfmCounterNames[23], .ProcResName: "ZnFPU2"},
185 { .Counter: X86PfmCounterNames[24], .ProcResName: "ZnFPU3"},
186 { .Counter: X86PfmCounterNames[26], .ProcResName: "ZnAGU"},
187 { .Counter: X86PfmCounterNames[20], .ProcResName: "ZnDivider"},
188 { .Counter: X86PfmCounterNames[26], .ProcResName: "Zn2AGU"},
189 { .Counter: X86PfmCounterNames[20], .ProcResName: "Zn2Divider"},
190 { .Counter: X86PfmCounterNames[30], .ProcResName: "Zn3Int"},
191 { .Counter: X86PfmCounterNames[29], .ProcResName: "Zn3FPU"},
192 { .Counter: X86PfmCounterNames[25], .ProcResName: "Zn3Load"},
193 { .Counter: X86PfmCounterNames[27], .ProcResName: "Zn3Store"},
194 { .Counter: X86PfmCounterNames[20], .ProcResName: "Zn3Divider"},
195 { .Counter: X86PfmCounterNames[30], .ProcResName: "Zn4Int"},
196 { .Counter: X86PfmCounterNames[29], .ProcResName: "Zn4FPU"},
197 { .Counter: X86PfmCounterNames[25], .ProcResName: "Zn4Load"},
198 { .Counter: X86PfmCounterNames[27], .ProcResName: "Zn4Store"},
199 { .Counter: X86PfmCounterNames[20], .ProcResName: "Zn4Divider"},
200 { .Counter: X86PfmCounterNames[26], .ProcResName: "Zn4AGU"},
201};
202
203static const std::pair<ValidationEvent, const char*> X86AlderLakePfmCountersValidationCounters[] = {
204 { InstructionRetired, X86PfmCounterNames[4]},
205 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
206 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
207 { DataTLBLoadMiss, X86PfmCounterNames[2]},
208 { DataTLBStoreMiss, X86PfmCounterNames[3]},
209 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
210 { BranchPredictionMiss, X86PfmCounterNames[0]},
211};
212
213static const PfmCountersInfo X86AlderLakePfmCounters = {
214 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
215 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
216 .UopsCounter: X86PfmCounterNames[77], // Uops counter
217 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
218 .IssueCounters: X86PfmIssueCounters + 0, .NumIssueCounters: 7, // Issue counters.
219 .ValidationEvents: X86AlderLakePfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
220};
221
222static const PfmCountersInfo X86AtomPfmCounters = {
223 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
224 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
225 .UopsCounter: X86PfmCounterNames[80], // Uops counter
226 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
227 .IssueCounters: nullptr, .NumIssueCounters: 0, // No issue counters
228 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
229};
230
231static const PfmCountersInfo X86BdVer2PfmCounters = {
232 .CycleCounter: X86PfmCounterNames[12], // Cycle counter
233 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
234 .UopsCounter: X86PfmCounterNames[32], // Uops counter
235 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
236 .IssueCounters: X86PfmIssueCounters + 7, .NumIssueCounters: 4, // Issue counters.
237 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
238};
239
240static const PfmCountersInfo X86BdVer3PfmCounters = {
241 .CycleCounter: X86PfmCounterNames[12], // Cycle counter
242 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
243 .UopsCounter: X86PfmCounterNames[32], // Uops counter
244 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
245 .IssueCounters: X86PfmIssueCounters + 11, .NumIssueCounters: 3, // Issue counters.
246 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
247};
248
249static const std::pair<ValidationEvent, const char*> X86BroadwellPfmCountersValidationCounters[] = {
250 { InstructionRetired, X86PfmCounterNames[4]},
251 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
252 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
253 { DataTLBLoadMiss, X86PfmCounterNames[2]},
254 { DataTLBStoreMiss, X86PfmCounterNames[3]},
255 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
256 { BranchPredictionMiss, X86PfmCounterNames[0]},
257};
258
259static const PfmCountersInfo X86BroadwellPfmCounters = {
260 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
261 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
262 .UopsCounter: X86PfmCounterNames[77], // Uops counter
263 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
264 .IssueCounters: X86PfmIssueCounters + 14, .NumIssueCounters: 8, // Issue counters.
265 .ValidationEvents: X86BroadwellPfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
266};
267
268static const PfmCountersInfo X86BtVer1PfmCounters = {
269 .CycleCounter: X86PfmCounterNames[12], // Cycle counter
270 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
271 .UopsCounter: X86PfmCounterNames[32], // Uops counter
272 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
273 .IssueCounters: X86PfmIssueCounters + 22, .NumIssueCounters: 2, // Issue counters.
274 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
275};
276
277static const PfmCountersInfo X86BtVer2PfmCounters = {
278 .CycleCounter: X86PfmCounterNames[12], // Cycle counter
279 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
280 .UopsCounter: X86PfmCounterNames[32], // Uops counter
281 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
282 .IssueCounters: X86PfmIssueCounters + 24, .NumIssueCounters: 2, // Issue counters.
283 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
284};
285
286static const PfmCountersInfo X86Core2PfmCounters = {
287 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
288 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
289 .UopsCounter: X86PfmCounterNames[80], // Uops counter
290 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
291 .IssueCounters: X86PfmIssueCounters + 26, .NumIssueCounters: 5, // Issue counters.
292 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
293};
294
295static const PfmCountersInfo X86CorePfmCounters = {
296 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
297 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
298 .UopsCounter: X86PfmCounterNames[80], // Uops counter
299 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
300 .IssueCounters: nullptr, .NumIssueCounters: 0, // No issue counters
301 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
302};
303
304static const PfmCountersInfo X86DefaultAMDPfmCounters = {
305 .CycleCounter: X86PfmCounterNames[12], // Cycle counter
306 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
307 .UopsCounter: X86PfmCounterNames[32], // Uops counter
308 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
309 .IssueCounters: nullptr, .NumIssueCounters: 0, // No issue counters
310 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
311};
312
313static const PfmCountersInfo X86DefaultPfmCounters = {
314 .CycleCounter: nullptr, // No cycle counter.
315 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
316 .UopsCounter: nullptr, // No uops counter.
317 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
318 .IssueCounters: nullptr, .NumIssueCounters: 0, // No issue counters
319 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
320};
321
322static const std::pair<ValidationEvent, const char*> X86HaswellPfmCountersValidationCounters[] = {
323 { InstructionRetired, X86PfmCounterNames[4]},
324 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
325 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
326 { DataTLBLoadMiss, X86PfmCounterNames[2]},
327 { DataTLBStoreMiss, X86PfmCounterNames[3]},
328 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
329 { BranchPredictionMiss, X86PfmCounterNames[0]},
330};
331
332static const PfmCountersInfo X86HaswellPfmCounters = {
333 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
334 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
335 .UopsCounter: X86PfmCounterNames[77], // Uops counter
336 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
337 .IssueCounters: X86PfmIssueCounters + 31, .NumIssueCounters: 8, // Issue counters.
338 .ValidationEvents: X86HaswellPfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
339};
340
341static const std::pair<ValidationEvent, const char*> X86IceLakePfmCountersValidationCounters[] = {
342 { InstructionRetired, X86PfmCounterNames[4]},
343 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
344 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
345 { DataTLBLoadMiss, X86PfmCounterNames[2]},
346 { DataTLBStoreMiss, X86PfmCounterNames[3]},
347 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
348 { BranchPredictionMiss, X86PfmCounterNames[0]},
349};
350
351static const PfmCountersInfo X86IceLakePfmCounters = {
352 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
353 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
354 .UopsCounter: X86PfmCounterNames[77], // Uops counter
355 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
356 .IssueCounters: X86PfmIssueCounters + 39, .NumIssueCounters: 7, // Issue counters.
357 .ValidationEvents: X86IceLakePfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
358};
359
360static const PfmCountersInfo X86KnightPfmCounters = {
361 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
362 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
363 .UopsCounter: X86PfmCounterNames[79], // Uops counter
364 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
365 .IssueCounters: nullptr, .NumIssueCounters: 0, // No issue counters
366 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
367};
368
369static const std::pair<ValidationEvent, const char*> X86LunarLakePfmCountersValidationCounters[] = {
370 { InstructionRetired, X86PfmCounterNames[4]},
371 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
372 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
373 { DataTLBLoadMiss, X86PfmCounterNames[2]},
374 { DataTLBStoreMiss, X86PfmCounterNames[3]},
375 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
376 { BranchPredictionMiss, X86PfmCounterNames[0]},
377};
378
379static const PfmCountersInfo X86LunarLakePfmCounters = {
380 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
381 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
382 .UopsCounter: X86PfmCounterNames[77], // Uops counter
383 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
384 .IssueCounters: X86PfmIssueCounters + 46, .NumIssueCounters: 7, // Issue counters.
385 .ValidationEvents: X86LunarLakePfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
386};
387
388static const PfmCountersInfo X86NehalemPfmCounters = {
389 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
390 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
391 .UopsCounter: X86PfmCounterNames[80], // Uops counter
392 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
393 .IssueCounters: X86PfmIssueCounters + 53, .NumIssueCounters: 5, // Issue counters.
394 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
395};
396
397static const PfmCountersInfo X86PentiumPfmCounters = {
398 .CycleCounter: X86PfmCounterNames[12], // Cycle counter
399 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
400 .UopsCounter: X86PfmCounterNames[78], // Uops counter
401 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
402 .IssueCounters: nullptr, .NumIssueCounters: 0, // No issue counters
403 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
404};
405
406static const PfmCountersInfo X86SLMPfmCounters = {
407 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
408 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
409 .UopsCounter: X86PfmCounterNames[80], // Uops counter
410 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
411 .IssueCounters: X86PfmIssueCounters + 58, .NumIssueCounters: 1, // Issue counters.
412 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
413};
414
415static const std::pair<ValidationEvent, const char*> X86SandyBridgePfmCountersValidationCounters[] = {
416 { InstructionRetired, X86PfmCounterNames[4]},
417 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
418 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
419 { DataTLBLoadMiss, X86PfmCounterNames[2]},
420 { DataTLBStoreMiss, X86PfmCounterNames[3]},
421 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
422 { BranchPredictionMiss, X86PfmCounterNames[0]},
423};
424
425static const PfmCountersInfo X86SandyBridgePfmCounters = {
426 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
427 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
428 .UopsCounter: X86PfmCounterNames[77], // Uops counter
429 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
430 .IssueCounters: X86PfmIssueCounters + 59, .NumIssueCounters: 5, // Issue counters.
431 .ValidationEvents: X86SandyBridgePfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
432};
433
434static const std::pair<ValidationEvent, const char*> X86SapphireRapidsPfmCountersValidationCounters[] = {
435 { InstructionRetired, X86PfmCounterNames[4]},
436 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
437 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
438 { DataTLBLoadMiss, X86PfmCounterNames[2]},
439 { DataTLBStoreMiss, X86PfmCounterNames[3]},
440 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
441 { BranchPredictionMiss, X86PfmCounterNames[0]},
442};
443
444static const PfmCountersInfo X86SapphireRapidsPfmCounters = {
445 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
446 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
447 .UopsCounter: X86PfmCounterNames[77], // Uops counter
448 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
449 .IssueCounters: X86PfmIssueCounters + 64, .NumIssueCounters: 7, // Issue counters.
450 .ValidationEvents: X86SapphireRapidsPfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
451};
452
453static const std::pair<ValidationEvent, const char*> X86SkylakeClientPfmCountersValidationCounters[] = {
454 { InstructionRetired, X86PfmCounterNames[4]},
455 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
456 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
457 { DataTLBLoadMiss, X86PfmCounterNames[2]},
458 { DataTLBStoreMiss, X86PfmCounterNames[3]},
459 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
460 { BranchPredictionMiss, X86PfmCounterNames[0]},
461};
462
463static const PfmCountersInfo X86SkylakeClientPfmCounters = {
464 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
465 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
466 .UopsCounter: X86PfmCounterNames[77], // Uops counter
467 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
468 .IssueCounters: X86PfmIssueCounters + 71, .NumIssueCounters: 8, // Issue counters.
469 .ValidationEvents: X86SkylakeClientPfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
470};
471
472static const std::pair<ValidationEvent, const char*> X86SkylakeServerPfmCountersValidationCounters[] = {
473 { InstructionRetired, X86PfmCounterNames[4]},
474 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
475 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
476 { DataTLBLoadMiss, X86PfmCounterNames[2]},
477 { DataTLBStoreMiss, X86PfmCounterNames[3]},
478 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
479 { BranchPredictionMiss, X86PfmCounterNames[0]},
480};
481
482static const PfmCountersInfo X86SkylakeServerPfmCounters = {
483 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
484 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
485 .UopsCounter: X86PfmCounterNames[77], // Uops counter
486 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
487 .IssueCounters: X86PfmIssueCounters + 79, .NumIssueCounters: 8, // Issue counters.
488 .ValidationEvents: X86SkylakeServerPfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
489};
490
491static const std::pair<ValidationEvent, const char*> X86ZnVer1PfmCountersValidationCounters[] = {
492 { InstructionRetired, X86PfmCounterNames[11]},
493 { L1DCacheLoadMiss, X86PfmCounterNames[7]},
494 { L1DCacheStoreMiss, X86PfmCounterNames[8]},
495 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
496 { DataTLBLoadMiss, X86PfmCounterNames[1]},
497 { InstructionTLBLoadMiss, X86PfmCounterNames[5]},
498 { BranchPredictionMiss, X86PfmCounterNames[0]},
499};
500
501static const PfmCountersInfo X86ZnVer1PfmCounters = {
502 .CycleCounter: X86PfmCounterNames[13], // Cycle counter
503 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
504 .UopsCounter: X86PfmCounterNames[32], // Uops counter
505 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
506 .IssueCounters: X86PfmIssueCounters + 87, .NumIssueCounters: 6, // Issue counters.
507 .ValidationEvents: X86ZnVer1PfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
508};
509
510static const std::pair<ValidationEvent, const char*> X86ZnVer2PfmCountersValidationCounters[] = {
511 { InstructionRetired, X86PfmCounterNames[11]},
512 { L1DCacheLoadMiss, X86PfmCounterNames[7]},
513 { L1DCacheStoreMiss, X86PfmCounterNames[8]},
514 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
515 { DataTLBLoadMiss, X86PfmCounterNames[1]},
516 { InstructionTLBLoadMiss, X86PfmCounterNames[5]},
517 { BranchPredictionMiss, X86PfmCounterNames[0]},
518};
519
520static const PfmCountersInfo X86ZnVer2PfmCounters = {
521 .CycleCounter: X86PfmCounterNames[13], // Cycle counter
522 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
523 .UopsCounter: X86PfmCounterNames[32], // Uops counter
524 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
525 .IssueCounters: X86PfmIssueCounters + 93, .NumIssueCounters: 2, // Issue counters.
526 .ValidationEvents: X86ZnVer2PfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
527};
528
529static const std::pair<ValidationEvent, const char*> X86ZnVer3PfmCountersValidationCounters[] = {
530 { InstructionRetired, X86PfmCounterNames[11]},
531 { L1DCacheLoadMiss, X86PfmCounterNames[7]},
532 { L1DCacheStoreMiss, X86PfmCounterNames[8]},
533 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
534 { DataTLBLoadMiss, X86PfmCounterNames[1]},
535 { InstructionTLBLoadMiss, X86PfmCounterNames[5]},
536 { BranchPredictionMiss, X86PfmCounterNames[0]},
537};
538
539static const PfmCountersInfo X86ZnVer3PfmCounters = {
540 .CycleCounter: X86PfmCounterNames[13], // Cycle counter
541 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
542 .UopsCounter: X86PfmCounterNames[31], // Uops counter
543 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
544 .IssueCounters: X86PfmIssueCounters + 95, .NumIssueCounters: 5, // Issue counters.
545 .ValidationEvents: X86ZnVer3PfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
546};
547
548static const std::pair<ValidationEvent, const char*> X86ZnVer4PfmCountersValidationCounters[] = {
549 { InstructionRetired, X86PfmCounterNames[11]},
550 { L1DCacheLoadMiss, X86PfmCounterNames[7]},
551 { L1DCacheStoreMiss, X86PfmCounterNames[8]},
552 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
553 { DataTLBLoadMiss, X86PfmCounterNames[1]},
554 { InstructionTLBLoadMiss, X86PfmCounterNames[5]},
555 { BranchPredictionMiss, X86PfmCounterNames[0]},
556};
557
558static const PfmCountersInfo X86ZnVer4PfmCounters = {
559 .CycleCounter: X86PfmCounterNames[13], // Cycle counter
560 .CycleCounterEventSelect: -1, .CycleCounterUMask: 0, // No raw cycle counter
561 .UopsCounter: X86PfmCounterNames[31], // Uops counter
562 .UopsCounterEventSelect: -1, .UopsCounterUMask: 0, // No raw uops counter
563 .IssueCounters: X86PfmIssueCounters + 100, .NumIssueCounters: 6, // Issue counters.
564 .ValidationEvents: X86ZnVer4PfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
565};
566
567// Sorted (by CpuName) array of pfm counters.
568static const CpuAndPfmCounters X86CpuPfmCounters[] = {
569 { .CpuName: "", .PCI: &X86DefaultPfmCounters },
570 { .CpuName: "alderlake", .PCI: &X86AlderLakePfmCounters },
571 { .CpuName: "amdfam10", .PCI: &X86DefaultAMDPfmCounters },
572 { .CpuName: "athlon", .PCI: &X86DefaultAMDPfmCounters },
573 { .CpuName: "athlon-4", .PCI: &X86DefaultAMDPfmCounters },
574 { .CpuName: "athlon-fx", .PCI: &X86DefaultAMDPfmCounters },
575 { .CpuName: "athlon-mp", .PCI: &X86DefaultAMDPfmCounters },
576 { .CpuName: "athlon-tbird", .PCI: &X86DefaultAMDPfmCounters },
577 { .CpuName: "athlon-xp", .PCI: &X86DefaultAMDPfmCounters },
578 { .CpuName: "athlon64", .PCI: &X86DefaultAMDPfmCounters },
579 { .CpuName: "athlon64-sse3", .PCI: &X86DefaultAMDPfmCounters },
580 { .CpuName: "atom", .PCI: &X86AtomPfmCounters },
581 { .CpuName: "barcelona", .PCI: &X86DefaultAMDPfmCounters },
582 { .CpuName: "bdver1", .PCI: &X86BdVer2PfmCounters },
583 { .CpuName: "bdver2", .PCI: &X86BdVer2PfmCounters },
584 { .CpuName: "bdver3", .PCI: &X86BdVer3PfmCounters },
585 { .CpuName: "bdver4", .PCI: &X86BdVer3PfmCounters },
586 { .CpuName: "bonnell", .PCI: &X86AtomPfmCounters },
587 { .CpuName: "broadwell", .PCI: &X86BroadwellPfmCounters },
588 { .CpuName: "btver1", .PCI: &X86BtVer1PfmCounters },
589 { .CpuName: "btver2", .PCI: &X86BtVer2PfmCounters },
590 { .CpuName: "cannonlake", .PCI: &X86SkylakeServerPfmCounters },
591 { .CpuName: "cascadelake", .PCI: &X86SkylakeServerPfmCounters },
592 { .CpuName: "core2", .PCI: &X86Core2PfmCounters },
593 { .CpuName: "corei7", .PCI: &X86NehalemPfmCounters },
594 { .CpuName: "emeraldrapids", .PCI: &X86SapphireRapidsPfmCounters },
595 { .CpuName: "goldmont", .PCI: &X86SLMPfmCounters },
596 { .CpuName: "goldmont-plus", .PCI: &X86SLMPfmCounters },
597 { .CpuName: "haswell", .PCI: &X86HaswellPfmCounters },
598 { .CpuName: "icelake-client", .PCI: &X86IceLakePfmCounters },
599 { .CpuName: "icelake-server", .PCI: &X86IceLakePfmCounters },
600 { .CpuName: "ivybridge", .PCI: &X86SandyBridgePfmCounters },
601 { .CpuName: "k8", .PCI: &X86DefaultAMDPfmCounters },
602 { .CpuName: "k8-sse3", .PCI: &X86DefaultAMDPfmCounters },
603 { .CpuName: "knl", .PCI: &X86KnightPfmCounters },
604 { .CpuName: "knm", .PCI: &X86KnightPfmCounters },
605 { .CpuName: "lunarlake", .PCI: &X86LunarLakePfmCounters },
606 { .CpuName: "nehalem", .PCI: &X86NehalemPfmCounters },
607 { .CpuName: "opteron", .PCI: &X86DefaultAMDPfmCounters },
608 { .CpuName: "opteron-sse3", .PCI: &X86DefaultAMDPfmCounters },
609 { .CpuName: "penryn", .PCI: &X86Core2PfmCounters },
610 { .CpuName: "pentium-m", .PCI: &X86PentiumPfmCounters },
611 { .CpuName: "pentium2", .PCI: &X86PentiumPfmCounters },
612 { .CpuName: "pentium3", .PCI: &X86PentiumPfmCounters },
613 { .CpuName: "pentium3m", .PCI: &X86PentiumPfmCounters },
614 { .CpuName: "pentiumpro", .PCI: &X86PentiumPfmCounters },
615 { .CpuName: "prescott", .PCI: &X86CorePfmCounters },
616 { .CpuName: "rocketlake", .PCI: &X86IceLakePfmCounters },
617 { .CpuName: "sandybridge", .PCI: &X86SandyBridgePfmCounters },
618 { .CpuName: "sapphirerapids", .PCI: &X86SapphireRapidsPfmCounters },
619 { .CpuName: "silvermont", .PCI: &X86SLMPfmCounters },
620 { .CpuName: "skylake", .PCI: &X86SkylakeClientPfmCounters },
621 { .CpuName: "skylake-avx512", .PCI: &X86SkylakeServerPfmCounters },
622 { .CpuName: "tigerlake", .PCI: &X86IceLakePfmCounters },
623 { .CpuName: "tremont", .PCI: &X86SLMPfmCounters },
624 { .CpuName: "westmere", .PCI: &X86NehalemPfmCounters },
625 { .CpuName: "yonah", .PCI: &X86CorePfmCounters },
626 { .CpuName: "znver1", .PCI: &X86ZnVer1PfmCounters },
627 { .CpuName: "znver2", .PCI: &X86ZnVer2PfmCounters },
628 { .CpuName: "znver3", .PCI: &X86ZnVer3PfmCounters },
629 { .CpuName: "znver4", .PCI: &X86ZnVer4PfmCounters },
630 { .CpuName: "znver5", .PCI: &X86ZnVer4PfmCounters },
631 { .CpuName: "znver6", .PCI: &X86ZnVer4PfmCounters },
632};
633
634