[PATCH] D53766: [llvm-exegesis] Fix SNB counter definition and handling.

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 28 12:12:52 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL345480: [llvm-exegesis] Fix SNB counter definition and handling. (authored by courbet, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D53766

Files:
  llvm/trunk/tools/llvm-exegesis/lib/BenchmarkRunner.cpp


Index: llvm/trunk/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
===================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
+++ llvm/trunk/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.171437.patch
Type: text/x-patch
Size: 1026 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181028/7e6ccce1/attachment.bin>


More information about the llvm-commits mailing list