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

perf test: Fix record test on KVM guests

Using precise flag with br_inst_retired.near_call causes the test fail
on KVM guests, even when the guests have PMU forwarding enabled and the
event itself is supported.

Remove the precise flag in order to make the test work on KVM guests.

Signed-off-by: Michael Petlan <mpetlan@redhat.com>
Acked-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20221122083121.6012-1-mpetlan@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Michael Petlan and committed by
Arnaldo Carvalho de Melo
2e9f5bda 19030564

+1 -1
+1 -1
tools/perf/tests/shell/record.sh
··· 83 83 echo "Register capture test [Skipped missing registers]" 84 84 return 85 85 fi 86 - if ! perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call:p \ 86 + if ! perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call \ 87 87 -c 1000 --per-thread ${testprog} 2> /dev/null \ 88 88 | perf script -F ip,sym,iregs -i - 2> /dev/null \ 89 89 | grep -q "DI:"