[llvm-branch-commits] [llvm] [BOLT] Add perf2bolt pre-aggregated profile output (PR #199465)
Paschalis Mpeis via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed May 27 02:36:34 PDT 2026
================
@@ -1,5 +1,12 @@
import shutil
import subprocess
-if shutil.which("perf") is not None and subprocess.run(["perf", "record", "-e", "cycles:u", "-o", "/dev/null", "--", "perf", "--version"], capture_output=True).returncode == 0:
+cmd = "perf record -e cycles:u -o /dev/null {} -- perf --version"
+cmd_basic = cmd.format("").split()
+cmd_brstack = cmd.format("-j any,u").split()
+
+if shutil.which("perf") is not None:
+ if subprocess.run(cmd_basic, capture_output=True).returncode == 0:
----------------
paschalis-mpeis wrote:
Thanks for improving perf detection. We had cases on some distros where `/usr/bin/perf` was a wrapper echoed 'you must install perf'.
I'll confirm brstack detection on AArch64 on a dev board.
https://github.com/llvm/llvm-project/pull/199465
More information about the llvm-branch-commits
mailing list