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_port:port_0", // 39
51 "uops_dispatched_port:port_1", // 40
52 "uops_dispatched_port:port_2", // 41
53 "uops_dispatched_port:port_2 + uops_dispatched_port:port_3", // 42
54 "uops_dispatched_port:port_2_3", // 43
55 "uops_dispatched_port:port_2_3_10", // 44
56 "uops_dispatched_port:port_3", // 45
57 "uops_dispatched_port:port_4", // 46
58 "uops_dispatched_port:port_4_9", // 47
59 "uops_dispatched_port:port_5", // 48
60 "uops_dispatched_port:port_5_11", // 49
61 "uops_dispatched_port:port_6", // 50
62 "uops_dispatched_port:port_7", // 51
63 "uops_dispatched_port:port_7_8", // 52
64 "uops_executed:port0", // 53
65 "uops_executed:port1", // 54
66 "uops_executed:port2_core + uops_executed:port3_core", // 55
67 "uops_executed:port4_core", // 56
68 "uops_executed:port5", // 57
69 "uops_executed_port:port_0", // 58
70 "uops_executed_port:port_1", // 59
71 "uops_executed_port:port_2", // 60
72 "uops_executed_port:port_3", // 61
73 "uops_executed_port:port_4", // 62
74 "uops_executed_port:port_5", // 63
75 "uops_executed_port:port_6", // 64
76 "uops_executed_port:port_7", // 65
77 "uops_issued:any", // 66
78 "uops_retired", // 67
79 "uops_retired:all", // 68
80 "uops_retired:any", // 69
81};
82
83static const PfmCountersInfo::IssueCounter X86PfmIssueCounters[] = {
84 { .Counter: X86PfmCounterNames[39], .ProcResName: "ADLPPort00"},
85 { .Counter: X86PfmCounterNames[40], .ProcResName: "ADLPPort01"},
86 { .Counter: X86PfmCounterNames[44], .ProcResName: "ADLPPort02_03_10"},
87 { .Counter: X86PfmCounterNames[47], .ProcResName: "ADLPPort04_09"},
88 { .Counter: X86PfmCounterNames[49], .ProcResName: "ADLPPort05_11"},
89 { .Counter: X86PfmCounterNames[50], .ProcResName: "ADLPPort06"},
90 { .Counter: X86PfmCounterNames[52], .ProcResName: "ADLPPort07_08"},
91 { .Counter: X86PfmCounterNames[16], .ProcResName: "PdFPU0"},
92 { .Counter: X86PfmCounterNames[17], .ProcResName: "PdFPU1"},
93 { .Counter: X86PfmCounterNames[18], .ProcResName: "PdFPU2"},
94 { .Counter: X86PfmCounterNames[19], .ProcResName: "PdFPU3"},
95 { .Counter: X86PfmCounterNames[16], .ProcResName: "SrFPU0"},
96 { .Counter: X86PfmCounterNames[17], .ProcResName: "SrFPU1"},
97 { .Counter: X86PfmCounterNames[18], .ProcResName: "SrFPU2"},
98 { .Counter: X86PfmCounterNames[58], .ProcResName: "BWPort0"},
99 { .Counter: X86PfmCounterNames[59], .ProcResName: "BWPort1"},
100 { .Counter: X86PfmCounterNames[60], .ProcResName: "BWPort2"},
101 { .Counter: X86PfmCounterNames[61], .ProcResName: "BWPort3"},
102 { .Counter: X86PfmCounterNames[62], .ProcResName: "BWPort4"},
103 { .Counter: X86PfmCounterNames[63], .ProcResName: "BWPort5"},
104 { .Counter: X86PfmCounterNames[64], .ProcResName: "BWPort6"},
105 { .Counter: X86PfmCounterNames[65], .ProcResName: "BWPort7"},
106 { .Counter: X86PfmCounterNames[14], .ProcResName: "BtFPU0"},
107 { .Counter: X86PfmCounterNames[15], .ProcResName: "BtFPU1"},
108 { .Counter: X86PfmCounterNames[14], .ProcResName: "JFPU0"},
109 { .Counter: X86PfmCounterNames[15], .ProcResName: "JFPU1"},
110 { .Counter: X86PfmCounterNames[33], .ProcResName: "SBPort0"},
111 { .Counter: X86PfmCounterNames[34], .ProcResName: "SBPort1"},
112 { .Counter: X86PfmCounterNames[35], .ProcResName: "SBPort23"},
113 { .Counter: X86PfmCounterNames[36], .ProcResName: "SBPort4"},
114 { .Counter: X86PfmCounterNames[37], .ProcResName: "SBPort5"},
115 { .Counter: X86PfmCounterNames[58], .ProcResName: "HWPort0"},
116 { .Counter: X86PfmCounterNames[59], .ProcResName: "HWPort1"},
117 { .Counter: X86PfmCounterNames[60], .ProcResName: "HWPort2"},
118 { .Counter: X86PfmCounterNames[61], .ProcResName: "HWPort3"},
119 { .Counter: X86PfmCounterNames[62], .ProcResName: "HWPort4"},
120 { .Counter: X86PfmCounterNames[63], .ProcResName: "HWPort5"},
121 { .Counter: X86PfmCounterNames[64], .ProcResName: "HWPort6"},
122 { .Counter: X86PfmCounterNames[65], .ProcResName: "HWPort7"},
123 { .Counter: X86PfmCounterNames[39], .ProcResName: "ICXPort0"},
124 { .Counter: X86PfmCounterNames[40], .ProcResName: "ICXPort1"},
125 { .Counter: X86PfmCounterNames[43], .ProcResName: "ICXPort23"},
126 { .Counter: X86PfmCounterNames[47], .ProcResName: "ICXPort49"},
127 { .Counter: X86PfmCounterNames[48], .ProcResName: "ICXPort5"},
128 { .Counter: X86PfmCounterNames[50], .ProcResName: "ICXPort6"},
129 { .Counter: X86PfmCounterNames[52], .ProcResName: "ICXPort78"},
130 { .Counter: X86PfmCounterNames[53], .ProcResName: "SBPort0"},
131 { .Counter: X86PfmCounterNames[54], .ProcResName: "SBPort1"},
132 { .Counter: X86PfmCounterNames[55], .ProcResName: "SBPort23"},
133 { .Counter: X86PfmCounterNames[56], .ProcResName: "SBPort4"},
134 { .Counter: X86PfmCounterNames[57], .ProcResName: "SBPort5"},
135 { .Counter: X86PfmCounterNames[28], .ProcResName: "SLM_MEC_RSV"},
136 { .Counter: X86PfmCounterNames[39], .ProcResName: "SBPort0"},
137 { .Counter: X86PfmCounterNames[40], .ProcResName: "SBPort1"},
138 { .Counter: X86PfmCounterNames[42], .ProcResName: "SBPort23"},
139 { .Counter: X86PfmCounterNames[46], .ProcResName: "SBPort4"},
140 { .Counter: X86PfmCounterNames[48], .ProcResName: "SBPort5"},
141 { .Counter: X86PfmCounterNames[39], .ProcResName: "SKLPort0"},
142 { .Counter: X86PfmCounterNames[40], .ProcResName: "SKLPort1"},
143 { .Counter: X86PfmCounterNames[41], .ProcResName: "SKLPort2"},
144 { .Counter: X86PfmCounterNames[45], .ProcResName: "SKLPort3"},
145 { .Counter: X86PfmCounterNames[46], .ProcResName: "SKLPort4"},
146 { .Counter: X86PfmCounterNames[48], .ProcResName: "SKLPort5"},
147 { .Counter: X86PfmCounterNames[50], .ProcResName: "SKLPort6"},
148 { .Counter: X86PfmCounterNames[51], .ProcResName: "SKLPort7"},
149 { .Counter: X86PfmCounterNames[39], .ProcResName: "SKXPort0"},
150 { .Counter: X86PfmCounterNames[40], .ProcResName: "SKXPort1"},
151 { .Counter: X86PfmCounterNames[41], .ProcResName: "SKXPort2"},
152 { .Counter: X86PfmCounterNames[45], .ProcResName: "SKXPort3"},
153 { .Counter: X86PfmCounterNames[46], .ProcResName: "SKXPort4"},
154 { .Counter: X86PfmCounterNames[48], .ProcResName: "SKXPort5"},
155 { .Counter: X86PfmCounterNames[50], .ProcResName: "SKXPort6"},
156 { .Counter: X86PfmCounterNames[51], .ProcResName: "SKXPort7"},
157 { .Counter: X86PfmCounterNames[21], .ProcResName: "ZnFPU0"},
158 { .Counter: X86PfmCounterNames[22], .ProcResName: "ZnFPU1"},
159 { .Counter: X86PfmCounterNames[23], .ProcResName: "ZnFPU2"},
160 { .Counter: X86PfmCounterNames[24], .ProcResName: "ZnFPU3"},
161 { .Counter: X86PfmCounterNames[26], .ProcResName: "ZnAGU"},
162 { .Counter: X86PfmCounterNames[20], .ProcResName: "ZnDivider"},
163 { .Counter: X86PfmCounterNames[26], .ProcResName: "Zn2AGU"},
164 { .Counter: X86PfmCounterNames[20], .ProcResName: "Zn2Divider"},
165 { .Counter: X86PfmCounterNames[30], .ProcResName: "Zn3Int"},
166 { .Counter: X86PfmCounterNames[29], .ProcResName: "Zn3FPU"},
167 { .Counter: X86PfmCounterNames[25], .ProcResName: "Zn3Load"},
168 { .Counter: X86PfmCounterNames[27], .ProcResName: "Zn3Store"},
169 { .Counter: X86PfmCounterNames[20], .ProcResName: "Zn3Divider"},
170 { .Counter: X86PfmCounterNames[30], .ProcResName: "Zn4Int"},
171 { .Counter: X86PfmCounterNames[29], .ProcResName: "Zn4FPU"},
172 { .Counter: X86PfmCounterNames[25], .ProcResName: "Zn4Load"},
173 { .Counter: X86PfmCounterNames[27], .ProcResName: "Zn4Store"},
174 { .Counter: X86PfmCounterNames[20], .ProcResName: "Zn4Divider"},
175 { .Counter: X86PfmCounterNames[26], .ProcResName: "Zn4AGU"},
176};
177
178static const std::pair<ValidationEvent, const char*> X86AlderLakePfmCountersValidationCounters[] = {
179 { InstructionRetired, X86PfmCounterNames[4]},
180 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
181 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
182 { DataTLBLoadMiss, X86PfmCounterNames[2]},
183 { DataTLBStoreMiss, X86PfmCounterNames[3]},
184 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
185 { BranchPredictionMiss, X86PfmCounterNames[0]},
186};
187
188static const PfmCountersInfo X86AlderLakePfmCounters = {
189 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
190 .UopsCounter: X86PfmCounterNames[66], // Uops counter
191 .IssueCounters: X86PfmIssueCounters + 0, .NumIssueCounters: 7, // Issue counters.
192 .ValidationEvents: X86AlderLakePfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
193};
194
195static const PfmCountersInfo X86AtomPfmCounters = {
196 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
197 .UopsCounter: X86PfmCounterNames[69], // Uops counter
198 .IssueCounters: nullptr, .NumIssueCounters: 0, // No issue counters
199 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
200};
201
202static const PfmCountersInfo X86BdVer2PfmCounters = {
203 .CycleCounter: X86PfmCounterNames[12], // Cycle counter
204 .UopsCounter: X86PfmCounterNames[32], // Uops counter
205 .IssueCounters: X86PfmIssueCounters + 7, .NumIssueCounters: 4, // Issue counters.
206 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
207};
208
209static const PfmCountersInfo X86BdVer3PfmCounters = {
210 .CycleCounter: X86PfmCounterNames[12], // Cycle counter
211 .UopsCounter: X86PfmCounterNames[32], // Uops counter
212 .IssueCounters: X86PfmIssueCounters + 11, .NumIssueCounters: 3, // Issue counters.
213 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
214};
215
216static const std::pair<ValidationEvent, const char*> X86BroadwellPfmCountersValidationCounters[] = {
217 { InstructionRetired, X86PfmCounterNames[4]},
218 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
219 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
220 { DataTLBLoadMiss, X86PfmCounterNames[2]},
221 { DataTLBStoreMiss, X86PfmCounterNames[3]},
222 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
223 { BranchPredictionMiss, X86PfmCounterNames[0]},
224};
225
226static const PfmCountersInfo X86BroadwellPfmCounters = {
227 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
228 .UopsCounter: X86PfmCounterNames[66], // Uops counter
229 .IssueCounters: X86PfmIssueCounters + 14, .NumIssueCounters: 8, // Issue counters.
230 .ValidationEvents: X86BroadwellPfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
231};
232
233static const PfmCountersInfo X86BtVer1PfmCounters = {
234 .CycleCounter: X86PfmCounterNames[12], // Cycle counter
235 .UopsCounter: X86PfmCounterNames[32], // Uops counter
236 .IssueCounters: X86PfmIssueCounters + 22, .NumIssueCounters: 2, // Issue counters.
237 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
238};
239
240static const PfmCountersInfo X86BtVer2PfmCounters = {
241 .CycleCounter: X86PfmCounterNames[12], // Cycle counter
242 .UopsCounter: X86PfmCounterNames[32], // Uops counter
243 .IssueCounters: X86PfmIssueCounters + 24, .NumIssueCounters: 2, // Issue counters.
244 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
245};
246
247static const PfmCountersInfo X86Core2PfmCounters = {
248 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
249 .UopsCounter: X86PfmCounterNames[69], // Uops counter
250 .IssueCounters: X86PfmIssueCounters + 26, .NumIssueCounters: 5, // Issue counters.
251 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
252};
253
254static const PfmCountersInfo X86CorePfmCounters = {
255 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
256 .UopsCounter: X86PfmCounterNames[69], // Uops counter
257 .IssueCounters: nullptr, .NumIssueCounters: 0, // No issue counters
258 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
259};
260
261static const PfmCountersInfo X86DefaultAMDPfmCounters = {
262 .CycleCounter: X86PfmCounterNames[12], // Cycle counter
263 .UopsCounter: X86PfmCounterNames[32], // Uops counter
264 .IssueCounters: nullptr, .NumIssueCounters: 0, // No issue counters
265 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
266};
267
268static const PfmCountersInfo X86DefaultPfmCounters = {
269 .CycleCounter: nullptr, // No cycle counter.
270 .UopsCounter: nullptr, // No uops counter.
271 .IssueCounters: nullptr, .NumIssueCounters: 0, // No issue counters
272 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
273};
274
275static const std::pair<ValidationEvent, const char*> X86HaswellPfmCountersValidationCounters[] = {
276 { InstructionRetired, X86PfmCounterNames[4]},
277 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
278 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
279 { DataTLBLoadMiss, X86PfmCounterNames[2]},
280 { DataTLBStoreMiss, X86PfmCounterNames[3]},
281 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
282 { BranchPredictionMiss, X86PfmCounterNames[0]},
283};
284
285static const PfmCountersInfo X86HaswellPfmCounters = {
286 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
287 .UopsCounter: X86PfmCounterNames[66], // Uops counter
288 .IssueCounters: X86PfmIssueCounters + 31, .NumIssueCounters: 8, // Issue counters.
289 .ValidationEvents: X86HaswellPfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
290};
291
292static const std::pair<ValidationEvent, const char*> X86IceLakePfmCountersValidationCounters[] = {
293 { InstructionRetired, X86PfmCounterNames[4]},
294 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
295 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
296 { DataTLBLoadMiss, X86PfmCounterNames[2]},
297 { DataTLBStoreMiss, X86PfmCounterNames[3]},
298 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
299 { BranchPredictionMiss, X86PfmCounterNames[0]},
300};
301
302static const PfmCountersInfo X86IceLakePfmCounters = {
303 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
304 .UopsCounter: X86PfmCounterNames[66], // Uops counter
305 .IssueCounters: X86PfmIssueCounters + 39, .NumIssueCounters: 7, // Issue counters.
306 .ValidationEvents: X86IceLakePfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
307};
308
309static const PfmCountersInfo X86KnightPfmCounters = {
310 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
311 .UopsCounter: X86PfmCounterNames[68], // Uops counter
312 .IssueCounters: nullptr, .NumIssueCounters: 0, // No issue counters
313 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
314};
315
316static const PfmCountersInfo X86NehalemPfmCounters = {
317 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
318 .UopsCounter: X86PfmCounterNames[69], // Uops counter
319 .IssueCounters: X86PfmIssueCounters + 46, .NumIssueCounters: 5, // Issue counters.
320 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
321};
322
323static const PfmCountersInfo X86PentiumPfmCounters = {
324 .CycleCounter: X86PfmCounterNames[12], // Cycle counter
325 .UopsCounter: X86PfmCounterNames[67], // Uops counter
326 .IssueCounters: nullptr, .NumIssueCounters: 0, // No issue counters
327 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
328};
329
330static const PfmCountersInfo X86SLMPfmCounters = {
331 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
332 .UopsCounter: X86PfmCounterNames[69], // Uops counter
333 .IssueCounters: X86PfmIssueCounters + 51, .NumIssueCounters: 1, // Issue counters.
334 .ValidationEvents: nullptr, .NumValidationEvents: 0 // No validation counters.
335};
336
337static const std::pair<ValidationEvent, const char*> X86SandyBridgePfmCountersValidationCounters[] = {
338 { InstructionRetired, X86PfmCounterNames[4]},
339 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
340 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
341 { DataTLBLoadMiss, X86PfmCounterNames[2]},
342 { DataTLBStoreMiss, X86PfmCounterNames[3]},
343 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
344 { BranchPredictionMiss, X86PfmCounterNames[0]},
345};
346
347static const PfmCountersInfo X86SandyBridgePfmCounters = {
348 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
349 .UopsCounter: X86PfmCounterNames[66], // Uops counter
350 .IssueCounters: X86PfmIssueCounters + 52, .NumIssueCounters: 5, // Issue counters.
351 .ValidationEvents: X86SandyBridgePfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
352};
353
354static const std::pair<ValidationEvent, const char*> X86SkylakeClientPfmCountersValidationCounters[] = {
355 { InstructionRetired, X86PfmCounterNames[4]},
356 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
357 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
358 { DataTLBLoadMiss, X86PfmCounterNames[2]},
359 { DataTLBStoreMiss, X86PfmCounterNames[3]},
360 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
361 { BranchPredictionMiss, X86PfmCounterNames[0]},
362};
363
364static const PfmCountersInfo X86SkylakeClientPfmCounters = {
365 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
366 .UopsCounter: X86PfmCounterNames[66], // Uops counter
367 .IssueCounters: X86PfmIssueCounters + 57, .NumIssueCounters: 8, // Issue counters.
368 .ValidationEvents: X86SkylakeClientPfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
369};
370
371static const std::pair<ValidationEvent, const char*> X86SkylakeServerPfmCountersValidationCounters[] = {
372 { InstructionRetired, X86PfmCounterNames[4]},
373 { L1DCacheLoadMiss, X86PfmCounterNames[10]},
374 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
375 { DataTLBLoadMiss, X86PfmCounterNames[2]},
376 { DataTLBStoreMiss, X86PfmCounterNames[3]},
377 { InstructionTLBLoadMiss, X86PfmCounterNames[6]},
378 { BranchPredictionMiss, X86PfmCounterNames[0]},
379};
380
381static const PfmCountersInfo X86SkylakeServerPfmCounters = {
382 .CycleCounter: X86PfmCounterNames[38], // Cycle counter
383 .UopsCounter: X86PfmCounterNames[66], // Uops counter
384 .IssueCounters: X86PfmIssueCounters + 65, .NumIssueCounters: 8, // Issue counters.
385 .ValidationEvents: X86SkylakeServerPfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
386};
387
388static const std::pair<ValidationEvent, const char*> X86ZnVer1PfmCountersValidationCounters[] = {
389 { InstructionRetired, X86PfmCounterNames[11]},
390 { L1DCacheLoadMiss, X86PfmCounterNames[7]},
391 { L1DCacheStoreMiss, X86PfmCounterNames[8]},
392 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
393 { DataTLBLoadMiss, X86PfmCounterNames[1]},
394 { InstructionTLBLoadMiss, X86PfmCounterNames[5]},
395 { BranchPredictionMiss, X86PfmCounterNames[0]},
396};
397
398static const PfmCountersInfo X86ZnVer1PfmCounters = {
399 .CycleCounter: X86PfmCounterNames[13], // Cycle counter
400 .UopsCounter: X86PfmCounterNames[32], // Uops counter
401 .IssueCounters: X86PfmIssueCounters + 73, .NumIssueCounters: 6, // Issue counters.
402 .ValidationEvents: X86ZnVer1PfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
403};
404
405static const std::pair<ValidationEvent, const char*> X86ZnVer2PfmCountersValidationCounters[] = {
406 { InstructionRetired, X86PfmCounterNames[11]},
407 { L1DCacheLoadMiss, X86PfmCounterNames[7]},
408 { L1DCacheStoreMiss, X86PfmCounterNames[8]},
409 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
410 { DataTLBLoadMiss, X86PfmCounterNames[1]},
411 { InstructionTLBLoadMiss, X86PfmCounterNames[5]},
412 { BranchPredictionMiss, X86PfmCounterNames[0]},
413};
414
415static const PfmCountersInfo X86ZnVer2PfmCounters = {
416 .CycleCounter: X86PfmCounterNames[13], // Cycle counter
417 .UopsCounter: X86PfmCounterNames[32], // Uops counter
418 .IssueCounters: X86PfmIssueCounters + 79, .NumIssueCounters: 2, // Issue counters.
419 .ValidationEvents: X86ZnVer2PfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
420};
421
422static const std::pair<ValidationEvent, const char*> X86ZnVer3PfmCountersValidationCounters[] = {
423 { InstructionRetired, X86PfmCounterNames[11]},
424 { L1DCacheLoadMiss, X86PfmCounterNames[7]},
425 { L1DCacheStoreMiss, X86PfmCounterNames[8]},
426 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
427 { DataTLBLoadMiss, X86PfmCounterNames[1]},
428 { InstructionTLBLoadMiss, X86PfmCounterNames[5]},
429 { BranchPredictionMiss, X86PfmCounterNames[0]},
430};
431
432static const PfmCountersInfo X86ZnVer3PfmCounters = {
433 .CycleCounter: X86PfmCounterNames[13], // Cycle counter
434 .UopsCounter: X86PfmCounterNames[31], // Uops counter
435 .IssueCounters: X86PfmIssueCounters + 81, .NumIssueCounters: 5, // Issue counters.
436 .ValidationEvents: X86ZnVer3PfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
437};
438
439static const std::pair<ValidationEvent, const char*> X86ZnVer4PfmCountersValidationCounters[] = {
440 { InstructionRetired, X86PfmCounterNames[11]},
441 { L1DCacheLoadMiss, X86PfmCounterNames[7]},
442 { L1DCacheStoreMiss, X86PfmCounterNames[8]},
443 { L1ICacheLoadMiss, X86PfmCounterNames[9]},
444 { DataTLBLoadMiss, X86PfmCounterNames[1]},
445 { InstructionTLBLoadMiss, X86PfmCounterNames[5]},
446 { BranchPredictionMiss, X86PfmCounterNames[0]},
447};
448
449static const PfmCountersInfo X86ZnVer4PfmCounters = {
450 .CycleCounter: X86PfmCounterNames[13], // Cycle counter
451 .UopsCounter: X86PfmCounterNames[31], // Uops counter
452 .IssueCounters: X86PfmIssueCounters + 86, .NumIssueCounters: 6, // Issue counters.
453 .ValidationEvents: X86ZnVer4PfmCountersValidationCounters, .NumValidationEvents: 7 // Validation counters.
454};
455
456// Sorted (by CpuName) array of pfm counters.
457static const CpuAndPfmCounters X86CpuPfmCounters[] = {
458 { .CpuName: "", .PCI: &X86DefaultPfmCounters },
459 { .CpuName: "alderlake", .PCI: &X86AlderLakePfmCounters },
460 { .CpuName: "amdfam10", .PCI: &X86DefaultAMDPfmCounters },
461 { .CpuName: "athlon", .PCI: &X86DefaultAMDPfmCounters },
462 { .CpuName: "athlon-4", .PCI: &X86DefaultAMDPfmCounters },
463 { .CpuName: "athlon-fx", .PCI: &X86DefaultAMDPfmCounters },
464 { .CpuName: "athlon-mp", .PCI: &X86DefaultAMDPfmCounters },
465 { .CpuName: "athlon-tbird", .PCI: &X86DefaultAMDPfmCounters },
466 { .CpuName: "athlon-xp", .PCI: &X86DefaultAMDPfmCounters },
467 { .CpuName: "athlon64", .PCI: &X86DefaultAMDPfmCounters },
468 { .CpuName: "athlon64-sse3", .PCI: &X86DefaultAMDPfmCounters },
469 { .CpuName: "atom", .PCI: &X86AtomPfmCounters },
470 { .CpuName: "barcelona", .PCI: &X86DefaultAMDPfmCounters },
471 { .CpuName: "bdver1", .PCI: &X86BdVer2PfmCounters },
472 { .CpuName: "bdver2", .PCI: &X86BdVer2PfmCounters },
473 { .CpuName: "bdver3", .PCI: &X86BdVer3PfmCounters },
474 { .CpuName: "bdver4", .PCI: &X86BdVer3PfmCounters },
475 { .CpuName: "bonnell", .PCI: &X86AtomPfmCounters },
476 { .CpuName: "broadwell", .PCI: &X86BroadwellPfmCounters },
477 { .CpuName: "btver1", .PCI: &X86BtVer1PfmCounters },
478 { .CpuName: "btver2", .PCI: &X86BtVer2PfmCounters },
479 { .CpuName: "cannonlake", .PCI: &X86SkylakeServerPfmCounters },
480 { .CpuName: "cascadelake", .PCI: &X86SkylakeServerPfmCounters },
481 { .CpuName: "core2", .PCI: &X86Core2PfmCounters },
482 { .CpuName: "corei7", .PCI: &X86NehalemPfmCounters },
483 { .CpuName: "goldmont", .PCI: &X86SLMPfmCounters },
484 { .CpuName: "goldmont-plus", .PCI: &X86SLMPfmCounters },
485 { .CpuName: "haswell", .PCI: &X86HaswellPfmCounters },
486 { .CpuName: "icelake-client", .PCI: &X86IceLakePfmCounters },
487 { .CpuName: "icelake-server", .PCI: &X86IceLakePfmCounters },
488 { .CpuName: "ivybridge", .PCI: &X86SandyBridgePfmCounters },
489 { .CpuName: "k8", .PCI: &X86DefaultAMDPfmCounters },
490 { .CpuName: "k8-sse3", .PCI: &X86DefaultAMDPfmCounters },
491 { .CpuName: "knl", .PCI: &X86KnightPfmCounters },
492 { .CpuName: "knm", .PCI: &X86KnightPfmCounters },
493 { .CpuName: "nehalem", .PCI: &X86NehalemPfmCounters },
494 { .CpuName: "opteron", .PCI: &X86DefaultAMDPfmCounters },
495 { .CpuName: "opteron-sse3", .PCI: &X86DefaultAMDPfmCounters },
496 { .CpuName: "penryn", .PCI: &X86Core2PfmCounters },
497 { .CpuName: "pentium-m", .PCI: &X86PentiumPfmCounters },
498 { .CpuName: "pentium2", .PCI: &X86PentiumPfmCounters },
499 { .CpuName: "pentium3", .PCI: &X86PentiumPfmCounters },
500 { .CpuName: "pentium3m", .PCI: &X86PentiumPfmCounters },
501 { .CpuName: "pentiumpro", .PCI: &X86PentiumPfmCounters },
502 { .CpuName: "prescott", .PCI: &X86CorePfmCounters },
503 { .CpuName: "rocketlake", .PCI: &X86IceLakePfmCounters },
504 { .CpuName: "sandybridge", .PCI: &X86SandyBridgePfmCounters },
505 { .CpuName: "silvermont", .PCI: &X86SLMPfmCounters },
506 { .CpuName: "skylake", .PCI: &X86SkylakeClientPfmCounters },
507 { .CpuName: "skylake-avx512", .PCI: &X86SkylakeServerPfmCounters },
508 { .CpuName: "tigerlake", .PCI: &X86IceLakePfmCounters },
509 { .CpuName: "tremont", .PCI: &X86SLMPfmCounters },
510 { .CpuName: "westmere", .PCI: &X86NehalemPfmCounters },
511 { .CpuName: "yonah", .PCI: &X86CorePfmCounters },
512 { .CpuName: "znver1", .PCI: &X86ZnVer1PfmCounters },
513 { .CpuName: "znver2", .PCI: &X86ZnVer2PfmCounters },
514 { .CpuName: "znver3", .PCI: &X86ZnVer3PfmCounters },
515 { .CpuName: "znver4", .PCI: &X86ZnVer4PfmCounters },
516 { .CpuName: "znver5", .PCI: &X86ZnVer4PfmCounters },
517};
518
519