[PATCH] D77422: [llvm-exegesis] Add benchmark mode that uses LBR for more precise measurements.
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 7 14:10:46 PDT 2020
oontvoo marked 9 inline comments as done.
oontvoo added inline comments.
================
Comment at: llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp:106
+ pfm::PerfEvent PerfEvent("LBR", LbrSamplePeriod);
+ pfm::Counter Counter = State.getExegesisTarget().createCounter(PerfEvent);
+ {
----------------
courbet wrote:
> Does'n this slice the `Counter` object ?
Yes, it would've ... Changed to Counter*
================
Comment at: llvm/tools/llvm-exegesis/lib/PerfHelper.cpp:91
+void PerfEvent::initPerfEventForLbr() {
+ Attr = new perf_event_attr();
+ *Attr = {0};
----------------
courbet wrote:
> Should this not be guarded by `HAVE_LIBPFM` ? Can you please try to compile & run without libpfm support to validate ?
Yes - it should be macro guarded. (I mindlessly deleted the guards while moving things around)
Added it back.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77422/new/
https://reviews.llvm.org/D77422
More information about the llvm-commits
mailing list