[PATCH] D53766: [llvm-exegesis] Fix SNB counter definition and handling.
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 26 08:28:42 PDT 2018
courbet created this revision.
courbet added a reviewer: gchatelet.
Herald added a subscriber: tschuett.
SNB is the only one that has https://reviews.llvm.org/P23 as a single proc res.
Repository:
rL LLVM
https://reviews.llvm.org/D53766
Files:
tools/llvm-exegesis/lib/BenchmarkRunner.cpp
Index: tools/llvm-exegesis/lib/BenchmarkRunner.cpp
===================================================================
--- tools/llvm-exegesis/lib/BenchmarkRunner.cpp
+++ tools/llvm-exegesis/lib/BenchmarkRunner.cpp
@@ -61,13 +61,14 @@
// (e.g. P23 on SandyBridge).
int64_t CounterValue = 0;
llvm::SmallVector<llvm::StringRef, 2> CounterNames;
- llvm::StringRef(Counters).split(CounterNames, ',');
+ llvm::StringRef(Counters).split(CounterNames, '+');
char *const ScratchPtr = Scratch->ptr();
- for (const auto &CounterName : CounterNames) {
+ for (auto &CounterName : CounterNames) {
+ CounterName = CounterName.trim();
pfm::PerfEvent PerfEvent(CounterName);
if (!PerfEvent.valid())
llvm::report_fatal_error(
- llvm::Twine("invalid perf event ").concat(Counters));
+ llvm::Twine("invalid perf event '").concat(CounterName).concat("'"));
pfm::Counter Counter(PerfEvent);
Scratch->clear();
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53766.171308.patch
Type: text/x-patch
Size: 993 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181026/1de23ce5/attachment.bin>
More information about the llvm-commits
mailing list