2022-09-27 05:23:04

by Xing Zhengjun

[permalink] [raw]
Subject: [PATCH] perf test: Fix test case 87 ("perf record tests") for hybrid systems

From: Zhengjun Xing <[email protected]>

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: 24f378e66021 ("perf test: Add basic perf record tests")
Signed-off-by: Zhengjun Xing <[email protected]>
Reviewed-by: Kan Liang <[email protected]>
---
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 00c7285ce1ac..301f95427159 100755
--- a/tools/perf/tests/shell/record.sh
+++ b/tools/perf/tests/shell/record.sh
@@ -61,7 +61,7 @@ test_register_capture() {
echo "Register capture test [Skipped missing registers]"
return
fi
- if ! perf record -o - --intr-regs=di,r8,dx,cx -e cpu/br_inst_retired.near_call/p \
+ if ! perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call:p \
-c 1000 --per-thread true 2> /dev/null \
| perf script -F ip,sym,iregs -i - 2> /dev/null \
| egrep -q "DI:"
--
2.25.1


2022-09-28 14:50:47

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: [PATCH] perf test: Fix test case 87 ("perf record tests") for hybrid systems

Em Tue, Sep 27, 2022 at 01:15:13PM +0800, [email protected] escreveu:
> From: Zhengjun Xing <[email protected]>
>
> 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

Looks sane, applied.

Ian, consider providing your Acked-by,

- Arnaldo

> Fixes: 24f378e66021 ("perf test: Add basic perf record tests")
> Signed-off-by: Zhengjun Xing <[email protected]>
> Reviewed-by: Kan Liang <[email protected]>
> ---
> 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 00c7285ce1ac..301f95427159 100755
> --- a/tools/perf/tests/shell/record.sh
> +++ b/tools/perf/tests/shell/record.sh
> @@ -61,7 +61,7 @@ test_register_capture() {
> echo "Register capture test [Skipped missing registers]"
> return
> fi
> - if ! perf record -o - --intr-regs=di,r8,dx,cx -e cpu/br_inst_retired.near_call/p \
> + if ! perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call:p \
> -c 1000 --per-thread true 2> /dev/null \
> | perf script -F ip,sym,iregs -i - 2> /dev/null \
> | egrep -q "DI:"
> --
> 2.25.1

--

- Arnaldo

2022-09-29 02:15:22

by Ian Rogers

[permalink] [raw]
Subject: Re: [PATCH] perf test: Fix test case 87 ("perf record tests") for hybrid systems

On Wed, Sep 28, 2022 at 7:28 AM Arnaldo Carvalho de Melo
<[email protected]> wrote:
>
> Em Tue, Sep 27, 2022 at 01:15:13PM +0800, [email protected] escreveu:
> > From: Zhengjun Xing <[email protected]>
> >
> > 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
>
> Looks sane, applied.
>
> Ian, consider providing your Acked-by,
>
> - Arnaldo

Acked-by: Ian Rogers <[email protected]>

Thanks,
Ian

>
> > Fixes: 24f378e66021 ("perf test: Add basic perf record tests")
> > Signed-off-by: Zhengjun Xing <[email protected]>
> > Reviewed-by: Kan Liang <[email protected]>
> > ---
> > 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 00c7285ce1ac..301f95427159 100755
> > --- a/tools/perf/tests/shell/record.sh
> > +++ b/tools/perf/tests/shell/record.sh
> > @@ -61,7 +61,7 @@ test_register_capture() {
> > echo "Register capture test [Skipped missing registers]"
> > return
> > fi
> > - if ! perf record -o - --intr-regs=di,r8,dx,cx -e cpu/br_inst_retired.near_call/p \
> > + if ! perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call:p \
> > -c 1000 --per-thread true 2> /dev/null \
> > | perf script -F ip,sym,iregs -i - 2> /dev/null \
> > | egrep -q "DI:"
> > --
> > 2.25.1
>
> --
>
> - Arnaldo

2022-09-29 13:17:16

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: [PATCH] perf test: Fix test case 87 ("perf record tests") for hybrid systems

Em Wed, Sep 28, 2022 at 07:11:15PM -0700, Ian Rogers escreveu:
> On Wed, Sep 28, 2022 at 7:28 AM Arnaldo Carvalho de Melo <[email protected]> wrote:
> > Em Tue, Sep 27, 2022 at 01:15:13PM +0800, [email protected] escreveu:
> > > From: Zhengjun Xing <[email protected]>
> > >
> > > 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
> >
> > Looks sane, applied.
> >
> > Ian, consider providing your Acked-by,

> Acked-by: Ian Rogers <[email protected]>

Thanks, added.

- Arnaldo