[llvm] [llvm-exegesis] Add support for pinning benchmarking process to a CPU (PR #85168)

Clement Courbet via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 18 23:20:17 PDT 2024


================
@@ -98,21 +98,24 @@ class InProcessFunctionExecutorImpl : public BenchmarkRunner::FunctionExecutor {
 public:
   static Expected<std::unique_ptr<InProcessFunctionExecutorImpl>>
   create(const LLVMState &State, object::OwningBinary<object::ObjectFile> Obj,
-         BenchmarkRunner::ScratchSpace *Scratch) {
+         BenchmarkRunner::ScratchSpace *Scratch,
+         std::optional<int> BenchmarkProcessCPU) {
     Expected<ExecutableFunction> EF =
         ExecutableFunction::create(State.createTargetMachine(), std::move(Obj));
 
     if (!EF)
       return EF.takeError();
 
     return std::unique_ptr<InProcessFunctionExecutorImpl>(
-        new InProcessFunctionExecutorImpl(State, std::move(*EF), Scratch));
+        new InProcessFunctionExecutorImpl(State, std::move(*EF), Scratch,
+                                          BenchmarkProcessCPU));
   }
 
 private:
   InProcessFunctionExecutorImpl(const LLVMState &State,
                                 ExecutableFunction Function,
-                                BenchmarkRunner::ScratchSpace *Scratch)
+                                BenchmarkRunner::ScratchSpace *Scratch,
+                                std::optional<int> BenchmarkCPU)
----------------
legrosbuffle wrote:

you can remove this now

https://github.com/llvm/llvm-project/pull/85168


More information about the llvm-commits mailing list