From: James Clark <james.clark@arm.com>
To: Thomas Richter <tmricht@linux.ibm.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
acme@kernel.org, german.gomez@arm.com
Cc: svens@linux.ibm.com, gor@linux.ibm.com, sumanthk@linux.ibm.com,
hca@linux.ibm.com
Subject: Re: [PATCH] perf/tests: Fix test case 95 on s390 and use same event
Date: Thu, 28 Jul 2022 10:09:49 +0100 [thread overview]
Message-ID: <3adff726-c3a1-e1db-0506-a3c2b742c9ea@arm.com> (raw)
In-Reply-To: <20220727141439.712582-1-tmricht@linux.ibm.com>
On 27/07/2022 15:14, Thomas Richter wrote:
> On linux-next tree perf test 95 was added recently.
> s390 does not support branch sampling at all and the test case fails
> despite for checking branch support before hand.
> The check for support of branching
> uses the software event named dummy, as seen in the line:
>
> perf record -b -o- -e dummy -B true > /dev/null 2>&1 || exit 2
>
> However when the branch recording is actually done, a different
> event is used, as seen in the line:
>
> perf record -o $TMPDIR/... --branch-filter any,save_type,u -- ...
>
> The event is omitted and for perf record the default event is
> cycles, which is not supported by s390 and this fails when executed
> on s390:
>
> # perf record --branch-filter any,save_type,u -- \
> /tmp/__perf_test.program.iDSmQ/a.out
> Error:
> cycles: PMU Hardware or event type doesn't support branch stack sampling.
> #
>
> Therefore fix this and use the same event cycles for testing support
> and actually running the test.
>
> Output before:
> # ./perf test -Fv 95
> 95: Check branch stack sampling :
> --- start ---
> Testing user branch stack sampling
> ---- end ----
> Check branch stack sampling: FAILED!
> #
>
> Output after:
> # ./perf test -Fv 95
> 95: Check branch stack sampling :
> --- start ---
> ---- end ----
> Check branch stack sampling: Skip
> #
>
> Fixes: b55878c90ab9 ("perf test: Add test for branch stack sampling")
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Looks good to me.
Reviewed-by: James Clark <james.clark@arm.com>
> ---
> tools/perf/tests/shell/test_brstack.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/tests/shell/test_brstack.sh b/tools/perf/tests/shell/test_brstack.sh
> index 113ccd17bf03..c644f94a6500 100755
> --- a/tools/perf/tests/shell/test_brstack.sh
> +++ b/tools/perf/tests/shell/test_brstack.sh
> @@ -12,7 +12,7 @@ if ! [ -x "$(command -v cc)" ]; then
> fi
>
> # skip the test if the hardware doesn't support branch stack sampling
> -perf record -b -o- -e dummy -B true > /dev/null 2>&1 || exit 2
> +perf record -b -o- -B true > /dev/null 2>&1 || exit 2
>
> TMPDIR=$(mktemp -d /tmp/__perf_test.program.XXXXX)
>
next prev parent reply other threads:[~2022-07-28 9:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-27 14:14 [PATCH] perf/tests: Fix test case 95 on s390 and use same event Thomas Richter
2022-07-28 9:09 ` James Clark [this message]
2022-07-28 9:25 ` German Gomez
2022-07-28 12:20 ` Thomas Richter
2022-07-28 12:28 ` German Gomez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3adff726-c3a1-e1db-0506-a3c2b742c9ea@arm.com \
--to=james.clark@arm.com \
--cc=acme@kernel.org \
--cc=german.gomez@arm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=sumanthk@linux.ibm.com \
--cc=svens@linux.ibm.com \
--cc=tmricht@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).