perf test: Fix record test on KVM guests
PATCH 1/1 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.
--- tools/perf/tests/shell/record.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/shell/record.sh +1 -1
@@ -134,7 +134,7 @@ test_register_capture() { echo "Register capture test [Skipped missing registers]" return fi - if ! perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call:p \ + if ! perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call \ -c 1000 --per-thread ${testprog} 2> /dev/null \ | perf script -F ip,sym,iregs -i - 2> /dev/null \ | grep -q "DI:"
Signature · 1 line
2.18.4
Quoted 8 lines · Michael Petlan
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 <[email protected]>
Thanks,
Ian
Quoted 20 lines
--- tools/perf/tests/shell/record.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/tests/shell/record.sh +1
-2@@ -134,7 +134,7 @@ test_register_capture() { echo "Register capture test [Skipped missing registers]" return fi - if ! perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call:p \ + if ! perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call \ -c 1000 --per-thread ${testprog} 2> /dev/null \ | perf script -F ip,sym,iregs -i - 2> /dev/null \ | grep -q "DI:" --2.18.4
Em Tue, Nov 22, 2022 at 09:31:49PM -0800, Ian Rogers escreveu:
Quoted 11 lines · Michael Petlan
Quoted 8 lines
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 <[email protected]>Acked-by Ian Rogers <[email protected]>
Thanks, applied.
- Arnaldo
Quoted 23 lines
Thanks,
IanQuoted 20 lines
--- tools/perf/tests/shell/record.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/tests/shell/record.sh +1
-2@@ -134,7 +134,7 @@ test_register_capture() { echo "Register capture test [Skipped missing registers]" return fi - if ! perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call:p \ + if ! perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call \ -c 1000 --per-thread ${testprog} 2> /dev/null \ | perf script -F ip,sym,iregs -i - 2> /dev/null \ | grep -q "DI:" --2.18.4
Signature · 1 line
- Arnaldo