[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 00:49:08 PDT 2024
================
@@ -577,11 +612,11 @@ BenchmarkRunner::getRunnableConfiguration(
Expected<std::unique_ptr<BenchmarkRunner::FunctionExecutor>>
BenchmarkRunner::createFunctionExecutor(
object::OwningBinary<object::ObjectFile> ObjectFile,
- const BenchmarkKey &Key) const {
+ const BenchmarkKey &Key, std::optional<int> BenchmarkProcessCPU) const {
switch (ExecutionMode) {
case ExecutionModeE::InProcess: {
auto InProcessExecutorOrErr = InProcessFunctionExecutorImpl::create(
- State, std::move(ObjectFile), Scratch.get());
+ State, std::move(ObjectFile), Scratch.get(), BenchmarkProcessCPU);
----------------
legrosbuffle wrote:
Let's check `BenchmarkProcessCPU` before calling `InProcessFunctionExecutorImpl::create` and return an error right away.
https://github.com/llvm/llvm-project/pull/85168
More information about the llvm-commits
mailing list