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

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 04:00:37 PDT 2024


steelannelida wrote:

> This patch broke trunk for me. I compile on a RHEL8 machine with clang 15.0.5 and I get
> 
> ```
> ../tools/llvm-exegesis/lib/BenchmarkRunner.cpp:416:12: error: use of undeclared identifier 'getcpu'; did you mean 'getcwd'?
>     assert(getcpu(&CurrentCPU, nullptr) == 0 &&
>            ^~~~~~
>            getcwd
> /usr/include/assert.h:90:27: note: expanded from macro 'assert'
>      (static_cast <bool> (expr)                                         \
>                           ^
> /usr/include/unistd.h:511:14: note: 'getcwd' declared here
> extern char *getcwd (char *__buf, size_t __size) __THROW __wur;
>              ^
> ../tools/llvm-exegesis/lib/BenchmarkRunner.cpp:416:19: error: cannot initialize a parameter of type 'char *' with an rvalue of type 'unsigned int *'
>     assert(getcpu(&CurrentCPU, nullptr) == 0 &&
>                   ^~~~~~~~~~~
> /usr/include/assert.h:90:27: note: expanded from macro 'assert'
>      (static_cast <bool> (expr)                                         \
>                           ^~~~
> /usr/include/unistd.h:511:28: note: passing argument to parameter '__buf' here
> extern char *getcwd (char *__buf, size_t __size) __THROW __wur;
>                            ^
> 2 errors generated.
> ```
> 
> Similar to the buildbot failure in the previous comment.

Same in our setup. How about reverting this?

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


More information about the llvm-commits mailing list