Skip to content

Commit aa15421

Browse files
[llvm-exegesis][X86] Update uop counter mappings for IceLake+
This patch updates the uop counter mappings for IceLake, AlderLake, and SapphireRapids. The names of the counters were changed slightly between these revisions for whatever reason. Validated by reading the libpfm4 source code and testing the exegesis binary with these changes on a SapphireRapids system.
1 parent 75c2888 commit aa15421

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

llvm/lib/Target/X86/X86PfmCounters.td

+21-21
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,13 @@ def IceLakePfmCounters : ProcPfmCounters {
189189
let CycleCounter = UnhaltedCoreCyclesPfmCounter;
190190
let UopsCounter = UopsIssuedPfmCounter;
191191
let IssueCounters = [
192-
PfmIssueCounter<"ICXPort0", "uops_dispatched_port:port_0">,
193-
PfmIssueCounter<"ICXPort1", "uops_dispatched_port:port_1">,
194-
PfmIssueCounter<"ICXPort23", "uops_dispatched_port:port_2_3">,
195-
PfmIssueCounter<"ICXPort49", "uops_dispatched_port:port_4_9">,
196-
PfmIssueCounter<"ICXPort5", "uops_dispatched_port:port_5">,
197-
PfmIssueCounter<"ICXPort6", "uops_dispatched_port:port_6">,
198-
PfmIssueCounter<"ICXPort78", "uops_dispatched_port:port_7_8">
192+
PfmIssueCounter<"ICXPort0", "uops_dispatched:port_0">,
193+
PfmIssueCounter<"ICXPort1", "uops_dispatched:port_1">,
194+
PfmIssueCounter<"ICXPort23", "uops_dispatched:port_2_3">,
195+
PfmIssueCounter<"ICXPort49", "uops_dispatched:port_4_9">,
196+
PfmIssueCounter<"ICXPort5", "uops_dispatched:port_5">,
197+
PfmIssueCounter<"ICXPort6", "uops_dispatched:port_6">,
198+
PfmIssueCounter<"ICXPort78", "uops_dispatched:port_7_8">
199199
];
200200
let ValidationCounters = DefaultIntelPfmValidationCounters;
201201
}
@@ -208,16 +208,16 @@ def AlderLakePfmCounters : ProcPfmCounters {
208208
let CycleCounter = UnhaltedCoreCyclesPfmCounter;
209209
let UopsCounter = UopsIssuedPfmCounter;
210210
let IssueCounters = [
211-
PfmIssueCounter<"ADLPPort00", "uops_dispatched_port:port_0">,
212-
PfmIssueCounter<"ADLPPort01", "uops_dispatched_port:port_1">,
211+
PfmIssueCounter<"ADLPPort00", "uops_dispatched:port_0">,
212+
PfmIssueCounter<"ADLPPort01", "uops_dispatched:port_1">,
213213
// The perfmon documentation and thus libpfm seems to incorrectly label
214214
// this performance counter, as ports 2,3, and 11 are actually grouped
215215
// according to most documentation. See #113941 for additional details.
216-
PfmIssueCounter<"ADLPPort02_03_11", "uops_dispatched_port:port_2_3_10">,
217-
PfmIssueCounter<"ADLPPort04_09", "uops_dispatched_port:port_4_9">,
218-
PfmIssueCounter<"ADLPPort05_11", "uops_dispatched_port:port_5_11">,
219-
PfmIssueCounter<"ADLPPort06", "uops_dispatched_port:port_6">,
220-
PfmIssueCounter<"ADLPPort07_08", "uops_dispatched_port:port_7_8">
216+
PfmIssueCounter<"ADLPPort02_03_11", "uops_dispatched:port_2_3_10">,
217+
PfmIssueCounter<"ADLPPort04_09", "uops_dispatched:port_4_9">,
218+
PfmIssueCounter<"ADLPPort05_11", "uops_dispatched:port_5_11">,
219+
PfmIssueCounter<"ADLPPort06", "uops_dispatched:port_6">,
220+
PfmIssueCounter<"ADLPPort07_08", "uops_dispatched:port_7_8">
221221
];
222222
let ValidationCounters = DefaultIntelPfmValidationCounters;
223223
}
@@ -227,16 +227,16 @@ def SapphireRapidsPfmCounters : ProcPfmCounters {
227227
let CycleCounter = UnhaltedCoreCyclesPfmCounter;
228228
let UopsCounter = UopsIssuedPfmCounter;
229229
let IssueCounters = [
230-
PfmIssueCounter<"SPRPort00", "uops_dispatched_port:port_0">,
231-
PfmIssueCounter<"SPRPort01", "uops_dispatched_port:port_1">,
230+
PfmIssueCounter<"SPRPort00", "uops_dispatched:port_0">,
231+
PfmIssueCounter<"SPRPort01", "uops_dispatched:port_1">,
232232
// The perfmon documentation and thus libpfm seems to incorrectly label
233233
// this performance counter, as ports 2,3, and 11 are actually grouped
234234
// according to most documentation. See #113941 for additional details.
235-
PfmIssueCounter<"SPRPort02_03_11", "uops_dispatched_port:port_2_3_10">,
236-
PfmIssueCounter<"SPRPort04_09", "uops_dispatched_port:port_4_9">,
237-
PfmIssueCounter<"SPRPort05_11", "uops_dispatched_port:port_5_11">,
238-
PfmIssueCounter<"SPRPort06", "uops_dispatched_port:port_6">,
239-
PfmIssueCounter<"SPRPort07_08", "uops_dispatched_port:port_7_8">,
235+
PfmIssueCounter<"SPRPort02_03_11", "uops_dispatched:port_2_3_10">,
236+
PfmIssueCounter<"SPRPort04_09", "uops_dispatched:port_4_9">,
237+
PfmIssueCounter<"SPRPort05_11", "uops_dispatched:port_5_11">,
238+
PfmIssueCounter<"SPRPort06", "uops_dispatched:port_6">,
239+
PfmIssueCounter<"SPRPort07_08", "uops_dispatched:port_7_8">,
240240
];
241241
let ValidationCounters = DefaultIntelPfmValidationCounters;
242242
}

0 commit comments

Comments
 (0)