From: James Clark <james.clark@linaro.org>
To: Thomas Richter <tmricht@linux.ibm.com>, namhyung@kernel.org
Cc: agordeev@linux.ibm.com, gor@linux.ibm.com,
sumanthk@linux.ibm.com, hca@linux.ibm.com,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
acme@kernel.org
Subject: Re: [PATCH 1/2 v2] perf test: Fix perf test 114 perf record test subtest precise_max for s390
Date: Wed, 29 Jan 2025 09:57:42 +0000 [thread overview]
Message-ID: <30865b2c-c58d-4974-9a88-dc13b8ad1195@linaro.org> (raw)
In-Reply-To: <20250129071134.4024430-1-tmricht@linux.ibm.com>
Is this a v2 of "[PATCH] perf test: Fix perf test 114 perf record test
for s390"? Or maybe the v2 is a typo?
On 29/01/2025 7:11 am, Thomas Richter wrote:
> On s390 the event instructions can not be used for recording.
> This event is only supported by perf stat.
>
> Change the event instruction to cycles for subtest test_precise_max
> as suggested by James Clark.
>
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> Suggested-by: James Clark <james.clark@linaro.org>
> ---
> tools/perf/tests/shell/record.sh | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
> index 0fc7a909ae9b..957ee10aff44 100755
> --- a/tools/perf/tests/shell/record.sh
> +++ b/tools/perf/tests/shell/record.sh
> @@ -287,9 +287,9 @@ test_precise_max() {
> return
> fi
> # On AMD, cycles and instructions events are treated differently
> - if ! perf record -o "${perfdata}" -e "instructions:P" true 2> /dev/null
> + if ! perf record -o "${perfdata}" -e "cycles:P" true 2> /dev/null
I'm not sure if this is the right fix. Doesn't this make the test test
cycles:P twice now?
I think the fix is to first test if cycles can be sampled, then test
cycles:P. Then test if instructions can be sampled, then test
instructions:P.
At the moment it checks the events with perf stat, and it checks them
both at the same time. Obviously that doesn't work if an event works for
perf stat but not perf record. And checking them both at the same time
doesn't allow for one existing and not the other.
> then
> - echo "precise_max attribute [Failed instructions:P event]"
> + echo "precise_max attribute [Failed cycles:P event]"
> err=1
> return
> fi
next prev parent reply other threads:[~2025-01-29 9:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 7:11 [PATCH 1/2 v2] perf test: Fix perf test 114 perf record test subtest precise_max for s390 Thomas Richter
2025-01-29 7:11 ` [PATCH 2/2 v2] perf test: Skip perf test 114 perf record test subtest test_leader_sampling " Thomas Richter
2025-01-29 11:25 ` James Clark
2025-01-29 9:57 ` James Clark [this message]
2025-01-29 11:11 ` [PATCH 1/2 v2] perf test: Fix perf test 114 perf record test subtest precise_max " James Clark
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=30865b2c-c58d-4974-9a88-dc13b8ad1195@linaro.org \
--to=james.clark@linaro.org \
--cc=acme@kernel.org \
--cc=agordeev@linux.ibm.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=namhyung@kernel.org \
--cc=sumanthk@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