Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf test: Fix test case 87 ("perf record tests") for hybrid systems

The test case 87 ("perf record tests") failed on hybrid systems,the event
"cpu/br_inst_retired.near_call/p" is only for non-hybrid system. Correct
the test event to support both non-hybrid and hybrid systems.

Before:

# ./perf test 87
87: perf record tests : FAILED!

After:

# ./perf test 87
87: perf record tests : Ok

Fixes: 24f378e66021f559 ("perf test: Add basic perf record tests")
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Xing Zhengjun <zhengjun.xing@linux.intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220927051513.3768717-1-zhengjun.xing@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Zhengjun Xing and committed by
Arnaldo Carvalho de Melo
457c8b60 74a61d53

+1 -1
+1 -1
tools/perf/tests/shell/record.sh
··· 61 61 echo "Register capture test [Skipped missing registers]" 62 62 return 63 63 fi 64 - if ! perf record -o - --intr-regs=di,r8,dx,cx -e cpu/br_inst_retired.near_call/p \ 64 + if ! perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call:p \ 65 65 -c 1000 --per-thread true 2> /dev/null \ 66 66 | perf script -F ip,sym,iregs -i - 2> /dev/null \ 67 67 | egrep -q "DI:"