[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0ba0b430-6215-4997-8a13-8ea74b3fe784@linaro.org>
Date: Thu, 30 Jan 2025 15:01:45 +0000
From: James Clark <james.clark@...aro.org>
To: Thomas Richter <tmricht@...ux.ibm.com>
Cc: agordeev@...ux.ibm.com, gor@...ux.ibm.com, sumanthk@...ux.ibm.com,
hca@...ux.ibm.com, linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org, acme@...nel.org, namhyung@...nel.org
Subject: Re: [PATCH 2/2] perf test: Change event in perf test 114 perf record
test subtest test_leader_sampling
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@...ux.ibm.com>
> Suggested-by: James Clark <james.clark@...aro.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@...aro.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
Powered by blists - more mailing lists