================
@@ -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
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits