[llvm] [llvm-profgen] Harden perf script invocation (PR #212253)

Sergey Shcherbinin via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 06:03:05 PDT 2026


SergeyShch01 wrote:

> Would it make more sense to modify PATH to replace perf binary lookup paths, rather than extending command line surface? BOLT uses that model, which sidesteps passing unrelated executables as perf.

@aaupov, 
 Thank you for the good point. However, an explicit option seems preferable to modifying `PATH` because:
  - It provides additional flexibility by making users independent of the `perf` binary name and other `perf`'s directory contents.
  - An invalid explicit path can be diagnosed, whereas an incorrect `PATH` override may silently fall back to the default `perf`.
 Would you be open to keeping the option?

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


More information about the llvm-commits mailing list