Skip to content

Commit

Permalink
perf test: Detect off-cpu support from build options
Browse files Browse the repository at this point in the history
Use perf version to detect whether BPF skeletons were enabled in a
build rather than a failing perf record.

Signed-off-by: Ian Rogers <[email protected]>
Tested-by: Namhyung Kim <[email protected]>
Cc: James Clark <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Nick Terrell <[email protected]>
Cc: Patrice Duroux <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: Andrii Nakryiko <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Athira Rajeev <[email protected]>
Cc: Tiezhu Yang <[email protected]>
Cc: Tom Rix <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Namhyung Kim <[email protected]>
  • Loading branch information
captain5050 authored and namhyung committed Sep 18, 2023
1 parent c2ac838 commit b4f48f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/tests/shell/record_offcpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test_offcpu_priv() {
err=2
return
fi
if perf record --off-cpu -o /dev/null --quiet true 2>&1 | grep BUILD_BPF_SKEL
if perf version --build-options 2>&1 | grep HAVE_BPF_SKEL | grep -q OFF
then
echo "off-cpu test [Skipped missing BPF support]"
err=2
Expand Down

0 comments on commit b4f48f3

Please sign in to comment.