Skip to contentSkip to conversation

perf test: Fix record test on KVM guests

PATCH Applied Michael Petlan 3 participants 3 messages Nov 22, 2022 – Nov 23, 2022 perf events

lore
Share & tools
lore
#0 lore raw

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
index e93b3a8871fe..a796222288ec 100755
@@ -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
reviewer Acked-by on v1 1/1
#1 lore raw
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.

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
index e93b3a8871fe..a796222288ec 100755
@@ -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

maintainer Applied
#2 lore raw

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.

Thanks, applied.

- Arnaldo

Quoted 23 lines

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
index e93b3a8871fe..a796222288ec 100755
@@ -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