diff options
author | Ian Rogers <[email protected]> | 2021-06-17 11:42:15 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2021-06-18 13:50:05 -0300 |
commit | 2638fbd351e8cdc3bca266004b6d348063153c3b (patch) | |
tree | 7ccc3572f670e26e5e30692f46908898ca19b280 | |
parent | 4bcbe438b3baaeb532dd50a5f002aed56c197e2a (diff) |
perf test: Add verbose skip output for bpf counters
Provide additional context for when the stat bpf counters test skips.
Signed-off-by: Ian Rogers <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Song Liu <[email protected]>
Cc: [email protected]
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rwxr-xr-x | tools/perf/tests/shell/stat_bpf_counters.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/tests/shell/stat_bpf_counters.sh b/tools/perf/tests/shell/stat_bpf_counters.sh index 22eb31e48ca7..85eb689fe202 100755 --- a/tools/perf/tests/shell/stat_bpf_counters.sh +++ b/tools/perf/tests/shell/stat_bpf_counters.sh @@ -22,7 +22,13 @@ compare_number() } # skip if --bpf-counters is not supported -perf stat --bpf-counters true > /dev/null 2>&1 || exit 2 +if ! perf stat --bpf-counters true > /dev/null 2>&1; then + if [ "$1" == "-v" ]; then + echo "Skipping: --bpf-counters not supported" + perf --no-pager stat --bpf-counters true || true + fi + exit 2 +fi base_cycles=$(perf stat --no-big-num -e cycles -- perf bench sched messaging -g 1 -l 100 -t 2>&1 | awk '/cycles/ {print $1}') bpf_cycles=$(perf stat --no-big-num --bpf-counters -e cycles -- perf bench sched messaging -g 1 -l 100 -t 2>&1 | awk '/cycles/ {print $1}') |