From 00a2d6e23d311b1459e326caa497834a6ccbda33 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 12 Dec 2022 11:28:22 +0000 Subject: [PATCH] [llvm-exegesis][X86] Add memory pipe counters to SLM model There might not be any exposed alu pipe counters for us to measure - but the sum of load/store uop counters seems to give a really good approximation to memory controller usage - even for more complex instructions like cmpxchg --- llvm/lib/Target/X86/X86PfmCounters.td | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/lib/Target/X86/X86PfmCounters.td b/llvm/lib/Target/X86/X86PfmCounters.td index 9c43178..6eccc1d 100644 --- a/llvm/lib/Target/X86/X86PfmCounters.td +++ b/llvm/lib/Target/X86/X86PfmCounters.td @@ -45,6 +45,9 @@ def : PfmCountersBinding<"atom", AtomPfmCounters>; def SLMPfmCounters : ProcPfmCounters { let CycleCounter = UnhaltedCoreCyclesPfmCounter; let UopsCounter = PfmCounter<"uops_retired:any">; + let IssueCounters = [ + PfmIssueCounter<"SLM_MEC_RSV", "mem_uop_retired:any_ld + mem_uop_retired:any_st"> + ]; } def : PfmCountersBinding<"silvermont", SLMPfmCounters>; def : PfmCountersBinding<"goldmont", SLMPfmCounters>; -- 2.7.4