[PATCH] D157686: [llvm-exegesis] Add error for subprocess and dummy perf counters

Aiden Grossman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 12:35:01 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGca8dbdc12a72: [llvm-exegesis] Add error for subprocess and dummy perf counters (authored by aidengrossman).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157686/new/

https://reviews.llvm.org/D157686

Files:
  llvm/test/tools/llvm-exegesis/X86/dummy-perf-counters-subprocess.s
  llvm/tools/llvm-exegesis/llvm-exegesis.cpp


Index: llvm/tools/llvm-exegesis/llvm-exegesis.cpp
===================================================================
--- llvm/tools/llvm-exegesis/llvm-exegesis.cpp
+++ llvm/tools/llvm-exegesis/llvm-exegesis.cpp
@@ -477,6 +477,11 @@
   if (BenchmarkPhaseSelector == BenchmarkPhaseSelectorE::Measure)
     ExitOnErr(State.getExegesisTarget().checkFeatureSupport());
 
+  if (ExecutionMode == BenchmarkRunner::ExecutionModeE::SubProcess &&
+      UseDummyPerfCounters)
+    ExitWithError("Dummy perf counters are not supported in the subprocess "
+                  "execution mode.");
+
   const std::unique_ptr<BenchmarkRunner> Runner =
       ExitOnErr(State.getExegesisTarget().createBenchmarkRunner(
           BenchmarkMode, State, BenchmarkPhaseSelector, ExecutionMode,
Index: llvm/test/tools/llvm-exegesis/X86/dummy-perf-counters-subprocess.s
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-exegesis/X86/dummy-perf-counters-subprocess.s
@@ -0,0 +1,7 @@
+# REQUIRES: exegesis-can-measure-latency, x86_64-linux
+
+# RUN: not llvm-exegesis -mtriple=x86_64-unknown-unknown -mode=latency -snippets-file=%s -execution-mode=subprocess -use-dummy-perf-counters 2>&1 | FileCheck %s
+
+# CHECK: llvm-exegesis error: Dummy perf counters are not supported in the subprocess execution mode.
+
+mov $0, %rax


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157686.555914.patch
Type: text/x-patch
Size: 1359 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230905/fe3160da/attachment.bin>


More information about the llvm-commits mailing list