diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-12-09 13:45:15 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-12-09 13:45:15 +0000 |
commit | e9d8275e4368a7b0e284915977c6fc49808c20ae (patch) | |
tree | 2b625059ced988f52dea9a8ac428110f7727947c /llvm/lib | |
parent | 2413638a6d39c4dd139c82e0719dd13194e6139b (diff) | |
download | llvm-e9d8275e4368a7b0e284915977c6fc49808c20ae.zip llvm-e9d8275e4368a7b0e284915977c6fc49808c20ae.tar.gz llvm-e9d8275e4368a7b0e284915977c6fc49808c20ae.tar.bz2 |
[X86] Extend pfm counter coverage for llvm-exegesis
Extension to rL348617, turns out llvm-exegesis doesn't need to match the perf counter name against a scheduler model resource name - so I've added a few more counters that I could find in the libpfm4 source code (and fix a typo in the knl/knm retired_uops counter - which uses 'all' instead of 'any').
llvm-svn: 348721
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86PfmCounters.td | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/llvm/lib/Target/X86/X86PfmCounters.td b/llvm/lib/Target/X86/X86PfmCounters.td index f38933a..a1a4210 100644 --- a/llvm/lib/Target/X86/X86PfmCounters.td +++ b/llvm/lib/Target/X86/X86PfmCounters.td @@ -56,8 +56,13 @@ def : PfmCountersBinding<"silvermont", SLMPfmCounters>; def : PfmCountersBinding<"goldmont", SLMPfmCounters>; def : PfmCountersBinding<"goldmont-plus", SLMPfmCounters>; def : PfmCountersBinding<"tremont", SLMPfmCounters>; -def : PfmCountersBinding<"knl", SLMPfmCounters>; -def : PfmCountersBinding<"knm", SLMPfmCounters>; + +def KnightPfmCounters : ProcPfmCounters { + let CycleCounter = UnhaltedCoreCyclesPfmCounter; + let UopsCounter = PfmCounter<"uops_retired:all">; +} +def : PfmCountersBinding<"knl", KnightPfmCounters>; +def : PfmCountersBinding<"knm", KnightPfmCounters>; def SandyBridgePfmCounters : ProcPfmCounters { let CycleCounter = UnhaltedCoreCyclesPfmCounter; @@ -161,9 +166,6 @@ def : PfmCountersBinding<"opteron-sse3", DefaultAMDPfmCounters>; def : PfmCountersBinding<"athlon64-sse3", DefaultAMDPfmCounters>; def : PfmCountersBinding<"amdfam10", DefaultAMDPfmCounters>; def : PfmCountersBinding<"barcelona", DefaultAMDPfmCounters>; -def : PfmCountersBinding<"btver1", DefaultAMDPfmCounters>; -def : PfmCountersBinding<"bdver3", DefaultAMDPfmCounters>; -def : PfmCountersBinding<"bdver4", DefaultAMDPfmCounters>; def BdVer2PfmCounters : ProcPfmCounters { let CycleCounter = PfmCounter<"cpu_clk_unhalted">; @@ -178,6 +180,28 @@ def BdVer2PfmCounters : ProcPfmCounters { def : PfmCountersBinding<"bdver1", BdVer2PfmCounters>; def : PfmCountersBinding<"bdver2", BdVer2PfmCounters>; +def BdVer3PfmCounters : ProcPfmCounters { + let CycleCounter = PfmCounter<"cpu_clk_unhalted">; + let UopsCounter = PfmCounter<"retired_uops">; + let IssueCounters = [ + PfmIssueCounter<"SrFPU0", "dispatched_fpu_ops:ops_pipe0 + dispatched_fpu_ops:ops_dual_pipe0">, + PfmIssueCounter<"SrFPU1", "dispatched_fpu_ops:ops_pipe1 + dispatched_fpu_ops:ops_dual_pipe1">, + PfmIssueCounter<"SrFPU2", "dispatched_fpu_ops:ops_pipe2 + dispatched_fpu_ops:ops_dual_pipe2"> + ]; +} +def : PfmCountersBinding<"bdver3", BdVer3PfmCounters>; +def : PfmCountersBinding<"bdver4", BdVer3PfmCounters>; + +def BtVer1PfmCounters : ProcPfmCounters { + let CycleCounter = PfmCounter<"cpu_clk_unhalted">; + let UopsCounter = PfmCounter<"retired_uops">; + let IssueCounters = [ + PfmIssueCounter<"BtFPU0", "dispatched_fpu:pipe0">, + PfmIssueCounter<"BtFPU1", "dispatched_fpu:pipe1"> + ]; +} +def : PfmCountersBinding<"btver1", BtVer1PfmCounters>; + def BtVer2PfmCounters : ProcPfmCounters { let CycleCounter = PfmCounter<"cpu_clk_unhalted">; let UopsCounter = PfmCounter<"retired_uops">; |