From: James Clark <james.clark@linaro.org>
To: Thomas Richter <tmricht@linux.ibm.com>
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, namhyung@kernel.org
Subject: Re: [PATCH 2/2] perf test: Change event in perf test 114 perf record test subtest test_leader_sampling
Date: Thu, 30 Jan 2025 15:01:45 +0000 [thread overview]
Message-ID: <0ba0b430-6215-4997-8a13-8ea74b3fe784@linaro.org> (raw)
In-Reply-To: <20250130115756.3961722-2-tmricht@linux.ibm.com>
On 30/01/2025 11:57 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 from instructions to cycles in
> subtest test_leader_sampling.
>
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> Suggested-by: James Clark <james.clark@linaro.org>
> ---
> tools/perf/tests/shell/record.sh | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
> index b905acde8358..a17018181afa 100755
> --- a/tools/perf/tests/shell/record.sh
> +++ b/tools/perf/tests/shell/record.sh
> @@ -231,7 +231,7 @@ test_cgroup() {
>
> test_leader_sampling() {
> echo "Basic leader sampling test"
> - if ! perf record -o "${perfdata}" -e "{instructions,instructions}:Su" -- \
> + if ! perf record -o "${perfdata}" -e "{cycles,cycles}:Su" -- \
> perf test -w brstack 2> /dev/null
> then
> echo "Leader sampling [Failed record]"
> @@ -243,10 +243,10 @@ test_leader_sampling() {
> while IFS= read -r line
> do
> # Check if the two instruction counts are equal in each record
> - instructions=$(echo $line | awk '{for(i=1;i<=NF;i++) if($i=="instructions:") print $(i-1)}')
> + instructions=$(echo $line | awk '{for(i=1;i<=NF;i++) if($i=="cycles:") print $(i-1)}')
Minor nit, but you could change the variable name too.
Reviewed-by: James Clark <james.clark@linaro.org>
> if [ $(($index%2)) -ne 0 ] && [ ${instructions}x != ${prev_instructions}x ]
> then
> - echo "Leader sampling [Failed inconsistent instructions count]"
> + echo "Leader sampling [Failed inconsistent cycles count]"
> err=1
> return
> fi
next prev parent reply other threads:[~2025-01-30 15:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-30 11:57 [PATCH 1/2] perf test: Fix perf test 114 perf record test subtest precise_max Thomas Richter
2025-01-30 11:57 ` [PATCH 2/2] perf test: Change event in perf test 114 perf record test subtest test_leader_sampling Thomas Richter
2025-01-30 15:01 ` James Clark [this message]
2025-01-30 15:05 ` [PATCH 1/2] 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=0ba0b430-6215-4997-8a13-8ea74b3fe784@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