Skip to content

fix: use system installed perf for flame graph data collection, if available#651

Merged
harp-intel merged 1 commit intomainfrom
perf-script-fail-on-mismatched-kernel
Mar 3, 2026
Merged

fix: use system installed perf for flame graph data collection, if available#651
harp-intel merged 1 commit intomainfrom
perf-script-fail-on-mismatched-kernel

Conversation

@harp-intel
Copy link
Contributor

This pull request updates the profiling script to prefer using the system-installed perf tool over the bundled version, aiming to reduce compatibility issues and crashes. All invocations of perf are updated to use the selected executable, improving reliability across different kernel versions.

Tool selection and reliability improvements:

  • Added logic to search for and prefer a system-installed perf binary over the bundled one, verifying that the discovered binary is functional and not a wrapper that fails due to missing kernel tools. This helps avoid kernel incompatibility issues that can cause crashes. (internal/script/scripts.go)
  • All script invocations of perf (for both frame pointer and dwarf profiling modes, as well as during data collapsing) now use the selected PERF_CMD variable instead of assuming perf is available in the current directory or PATH. (internal/script/scripts.go) [1] [2] [3]

…ailable

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
@harp-intel harp-intel merged commit 7afe6bb into main Mar 3, 2026
5 checks passed
@harp-intel harp-intel deleted the perf-script-fail-on-mismatched-kernel branch March 3, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant