[llvm] [llvm-exegesis] Add support for pinning benchmarking process to a CPU (PR #85168)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 19 06:29:36 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)
----------------
boomanaiden154 wrote:
Thanks for the catch! Removed it as a class member and apparently totally missed it in the constructor.
https://github.com/llvm/llvm-project/pull/85168
More information about the llvm-commits
mailing list