Skip to content

Commit d47f879

Browse files
author
mattarde
committed
update pfm for lnl
1 parent f96a694 commit d47f879

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

llvm/lib/Target/X86/X86PfmCounters.td

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,26 @@ def SapphireRapidsPfmCounters : ProcPfmCounters {
236236
}
237237
def : PfmCountersBinding<"sapphirerapids", SapphireRapidsPfmCounters>;
238238

239+
def LunarLakePfmCounters : ProcPfmCounters {
240+
let CycleCounter = UnhaltedCoreCyclesPfmCounter;
241+
let UopsCounter = UopsIssuedPfmCounter;
242+
let IssueCounters = [
243+
// Refer: https://perfmon-events.intel.com/ section Lunar Lake Hybrid Event
244+
// ALU Dispatch - Any of ALUs with latency 1 cycle that is not jmp or Shift.
245+
PfmIssueCounter<"LNLPVPort02_03", "uops_dispatched:alu">,
246+
PfmIssueCounter<"LNLPPort00_01_02_03_04_05", "uops_dispatched:int_eu_all">,
247+
PfmIssueCounter<"LNLPPort00_02_04", "uops_dispatched:jmp">,
248+
PfmIssueCounter<"LNLPPort20_21_22", "uops_dispatched:load">,
249+
PfmIssueCounter<"LNLPPort01_03_05", "uops_dispatched:shift">,
250+
// Slow Dispatch - If uops latency > 1, counted as slow. TBD
251+
// PfmIssueCounter<"LNLPPort01_03_05", "uops_dispatched:slow">,
252+
PfmIssueCounter<"LNLPPort25_26_27", "uops_dispatched:sta">,
253+
PfmIssueCounter<"LNLPPort10_11", "uops_dispatched:std">
254+
];
255+
let ValidationCounters = DefaultIntelPfmValidationCounters;
256+
}
257+
def : PfmCountersBinding<"Lunarlake", LunarLakePfmCounters>;
258+
239259
// AMD X86 Counters.
240260
defvar DefaultAMDPfmValidationCounters = [
241261
PfmValidationCounter<InstructionRetired, "RETIRED_INSTRUCTIONS">,

0 commit comments

Comments
 (0)