@@ -18,6 +18,10 @@ def DefaultPfmCounters : ProcPfmCounters {}
18
18
def : PfmCountersDefaultBinding<DefaultPfmCounters>;
19
19
20
20
// Intel X86 Counters.
21
+ defvar DefaultIntelPfmValidationCounters = [
22
+ PfmValidationCounter<InstructionRetired, "INSTRUCTIONS_RETIRED">
23
+ ];
24
+
21
25
def PentiumPfmCounters : ProcPfmCounters {
22
26
let CycleCounter = PfmCounter<"cpu_clk_unhalted">;
23
27
let UopsCounter = PfmCounter<"uops_retired">;
@@ -100,6 +104,7 @@ def SandyBridgePfmCounters : ProcPfmCounters {
100
104
PfmIssueCounter<"SBPort4", "uops_dispatched_port:port_4">,
101
105
PfmIssueCounter<"SBPort5", "uops_dispatched_port:port_5">
102
106
];
107
+ let ValidationCounters = DefaultIntelPfmValidationCounters;
103
108
}
104
109
def : PfmCountersBinding<"sandybridge", SandyBridgePfmCounters>;
105
110
def : PfmCountersBinding<"ivybridge", SandyBridgePfmCounters>;
@@ -117,6 +122,7 @@ def HaswellPfmCounters : ProcPfmCounters {
117
122
PfmIssueCounter<"HWPort6", "uops_executed_port:port_6">,
118
123
PfmIssueCounter<"HWPort7", "uops_executed_port:port_7">
119
124
];
125
+ let ValidationCounters = DefaultIntelPfmValidationCounters;
120
126
}
121
127
def : PfmCountersBinding<"haswell", HaswellPfmCounters>;
122
128
@@ -133,6 +139,7 @@ def BroadwellPfmCounters : ProcPfmCounters {
133
139
PfmIssueCounter<"BWPort6", "uops_executed_port:port_6">,
134
140
PfmIssueCounter<"BWPort7", "uops_executed_port:port_7">
135
141
];
142
+ let ValidationCounters = DefaultIntelPfmValidationCounters;
136
143
}
137
144
def : PfmCountersBinding<"broadwell", BroadwellPfmCounters>;
138
145
@@ -149,6 +156,7 @@ def SkylakeClientPfmCounters : ProcPfmCounters {
149
156
PfmIssueCounter<"SKLPort6", "uops_dispatched_port:port_6">,
150
157
PfmIssueCounter<"SKLPort7", "uops_dispatched_port:port_7">
151
158
];
159
+ let ValidationCounters = DefaultIntelPfmValidationCounters;
152
160
}
153
161
def : PfmCountersBinding<"skylake", SkylakeClientPfmCounters>;
154
162
@@ -165,6 +173,7 @@ def SkylakeServerPfmCounters : ProcPfmCounters {
165
173
PfmIssueCounter<"SKXPort6", "uops_dispatched_port:port_6">,
166
174
PfmIssueCounter<"SKXPort7", "uops_dispatched_port:port_7">
167
175
];
176
+ let ValidationCounters = DefaultIntelPfmValidationCounters;
168
177
}
169
178
def : PfmCountersBinding<"skylake-avx512", SkylakeServerPfmCounters>;
170
179
def : PfmCountersBinding<"cascadelake", SkylakeServerPfmCounters>;
@@ -182,13 +191,18 @@ def IceLakePfmCounters : ProcPfmCounters {
182
191
PfmIssueCounter<"ICXPort6", "uops_dispatched_port:port_6">,
183
192
PfmIssueCounter<"ICXPort78", "uops_dispatched_port:port_7_8">
184
193
];
194
+ let ValidationCounters = DefaultIntelPfmValidationCounters;
185
195
}
186
196
def : PfmCountersBinding<"icelake-client", IceLakePfmCounters>;
187
197
def : PfmCountersBinding<"icelake-server", IceLakePfmCounters>;
188
198
def : PfmCountersBinding<"rocketlake", IceLakePfmCounters>;
189
199
def : PfmCountersBinding<"tigerlake", IceLakePfmCounters>;
190
200
191
201
// AMD X86 Counters.
202
+ defvar DefaultAMDPfmValidationCounters = [
203
+ PfmValidationCounter<InstructionRetired, "RETIRED_INSTRUCTIONS">
204
+ ];
205
+
192
206
// Set basic counters for AMD cpus that we know libpfm4 supports.
193
207
def DefaultAMDPfmCounters : ProcPfmCounters {
194
208
let CycleCounter = PfmCounter<"cpu_clk_unhalted">;
@@ -265,6 +279,7 @@ def ZnVer1PfmCounters : ProcPfmCounters {
265
279
PfmIssueCounter<"ZnAGU", "ls_dispatch:ld_st_dispatch + ls_dispatch:ld_dispatch + ls_dispatch:store_dispatch">,
266
280
PfmIssueCounter<"ZnDivider", "div_op_count">
267
281
];
282
+ let ValidationCounters = DefaultAMDPfmValidationCounters;
268
283
}
269
284
def : PfmCountersBinding<"znver1", ZnVer1PfmCounters>;
270
285
@@ -275,9 +290,7 @@ def ZnVer2PfmCounters : ProcPfmCounters {
275
290
PfmIssueCounter<"Zn2AGU", "ls_dispatch:ld_st_dispatch + ls_dispatch:ld_dispatch + ls_dispatch:store_dispatch">,
276
291
PfmIssueCounter<"Zn2Divider", "div_op_count">
277
292
];
278
- let ValidationCounters = [
279
- PfmValidationCounter<InstructionRetired, "RETIRED_INSTRUCTIONS">
280
- ];
293
+ let ValidationCounters = DefaultAMDPfmValidationCounters;
281
294
}
282
295
def : PfmCountersBinding<"znver2", ZnVer2PfmCounters>;
283
296
@@ -291,9 +304,7 @@ def ZnVer3PfmCounters : ProcPfmCounters {
291
304
PfmIssueCounter<"Zn3Store", "ls_dispatch:store_dispatch">,
292
305
PfmIssueCounter<"Zn3Divider", "div_op_count">
293
306
];
294
- let ValidationCounters = [
295
- PfmValidationCounter<InstructionRetired, "RETIRED_INSTRUCTIONS">
296
- ];
307
+ let ValidationCounters = DefaultAMDPfmValidationCounters;
297
308
}
298
309
def : PfmCountersBinding<"znver3", ZnVer3PfmCounters>;
299
310
@@ -308,5 +319,6 @@ def ZnVer4PfmCounters : ProcPfmCounters {
308
319
PfmIssueCounter<"Zn4Divider", "div_op_count">,
309
320
PfmIssueCounter<"Zn4AGU", "ls_dispatch:ld_st_dispatch + ls_dispatch:ld_dispatch + ls_dispatch:store_dispatch">
310
321
];
322
+ let ValidationCounters = DefaultAMDPfmValidationCounters;
311
323
}
312
324
def : PfmCountersBinding<"znver4", ZnVer4PfmCounters>;
0 commit comments