diff options
author | Ian Rogers <[email protected]> | 2023-09-14 14:19:48 -0700 |
---|---|---|
committer | Namhyung Kim <[email protected]> | 2023-09-18 16:46:53 -0700 |
commit | b4f48f34f9c195e8e82b31ecd8202445962c734b (patch) | |
tree | 31729260026c84e1b9169d669cd8ec812a2166af | |
parent | c2ac838ef734cb0ff351820b77acc6fd3b6634fb (diff) |
perf test: Detect off-cpu support from build options
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]>
-rwxr-xr-x | tools/perf/tests/shell/record_offcpu.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/tests/shell/record_offcpu.sh b/tools/perf/tests/shell/record_offcpu.sh index a0d14cd0aa79..a1ef8f0d2b5c 100755 --- a/tools/perf/tests/shell/record_offcpu.sh +++ b/tools/perf/tests/shell/record_offcpu.sh @@ -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 |