[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250417115204.12521Ef5-hca@linux.ibm.com>
Date: Thu, 17 Apr 2025 13:52:04 +0200
From: Heiko Carstens <hca@...ux.ibm.com>
To: Thomas Richter <tmricht@...ux.ibm.com>
Cc: linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org,
linux-perf-users@...r.kernel.org, acme@...nel.org, namhyung@...nel.org,
agordeev@...ux.ibm.com, gor@...ux.ibm.com, sumanthk@...ux.ibm.com
Subject: Re: [PATCH] perf/tests: Fix tests 84 and 86 Add --metric-only on s390
On Tue, Apr 15, 2025 at 03:45:53PM +0200, Thomas Richter wrote:
> On s390x z/VM machines the CPU Measurement Facility is not available.
> Events cycles and instructions do not exist.
> Running above tests on s390 z/VM always fails with this error:
>
> # ./perf test 84 86
> 84: perf stat JSON output linter : FAILED!
> 86: perf stat STD output linter : FAILED!
> #
I would guess this fails also for KVM guests?
> diff --git a/tools/perf/tests/shell/lib/stat_output.sh b/tools/perf/tests/shell/lib/stat_output.sh
> index 4d4aac547f01..a708dedf7d9d 100644
> --- a/tools/perf/tests/shell/lib/stat_output.sh
> +++ b/tools/perf/tests/shell/lib/stat_output.sh
> @@ -151,6 +151,11 @@ check_per_socket()
> check_metric_only()
> {
> echo -n "Checking $1 output: metric only "
> + if [ "$(uname -m)" = "s390x" ] && grep -q z/VM /proc/sysinfo
> + then
> + echo "[Skip] not supported on z/VM"
> + return
> + fi
Wouldn't it be better to test for the availability of the CPU-measurement
counter facility? That is: test if facility number 67 is present in the
facilities field of /proc/cpuinfo.
Powered by blists - more mailing lists