linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf test: Fix record test on KVM guests
@ 2022-11-22  8:31 Michael Petlan
  2022-11-23  5:31 ` Ian Rogers
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Petlan @ 2022-11-22  8:31 UTC (permalink / raw)
  To: linux-perf-users

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>
---
 tools/perf/tests/shell/record.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
index e93b3a8871fe..a796222288ec 100755
--- a/tools/perf/tests/shell/record.sh
+++ b/tools/perf/tests/shell/record.sh
@@ -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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf test: Fix record test on KVM guests
  2022-11-22  8:31 [PATCH] perf test: Fix record test on KVM guests Michael Petlan
@ 2022-11-23  5:31 ` Ian Rogers
  2022-11-23 13:35   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Rogers @ 2022-11-23  5:31 UTC (permalink / raw)
  To: Michael Petlan; +Cc: linux-perf-users

On Tue, Nov 22, 2022 at 12:33 AM Michael Petlan <mpetlan@redhat.com> wrote:
>
> 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>

Thanks,
Ian

> ---
>  tools/perf/tests/shell/record.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
> index e93b3a8871fe..a796222288ec 100755
> --- a/tools/perf/tests/shell/record.sh
> +++ b/tools/perf/tests/shell/record.sh
> @@ -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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf test: Fix record test on KVM guests
  2022-11-23  5:31 ` Ian Rogers
@ 2022-11-23 13:35   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-11-23 13:35 UTC (permalink / raw)
  To: Ian Rogers; +Cc: Michael Petlan, linux-perf-users

Em Tue, Nov 22, 2022 at 09:31:49PM -0800, Ian Rogers escreveu:
> On Tue, Nov 22, 2022 at 12:33 AM Michael Petlan <mpetlan@redhat.com> wrote:
> >
> > 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>

Thanks, applied.

- Arnaldo

 
> Thanks,
> Ian
> 
> > ---
> >  tools/perf/tests/shell/record.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
> > index e93b3a8871fe..a796222288ec 100755
> > --- a/tools/perf/tests/shell/record.sh
> > +++ b/tools/perf/tests/shell/record.sh
> > @@ -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
> >

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-23 13:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-22  8:31 [PATCH] perf test: Fix record test on KVM guests Michael Petlan
2022-11-23  5:31 ` Ian Rogers
2022-11-23 13:35   ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).