[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <aEHugAPinlWLuTAS@x1>
Date: Thu, 5 Jun 2025 16:22:40 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Chun-Tse Shao <ctshao@...gle.com>
Cc: Adrian Hunter <adrian.hunter@...el.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Andi Kleen <ak@...ux.intel.com>,
"Dr. David Alan Gilbert" <linux@...blig.org>,
Howard Chu <howardchu95@...il.com>, Ian Rogers <irogers@...gle.com>,
Ingo Molnar <mingo@...hat.com>,
James Clark <james.clark@...aro.org>, Jiri Olsa <jolsa@...nel.org>,
Kan Liang <kan.liang@...ux.intel.com>,
Levi Yun <yeoreum.yun@....com>, Mark Rutland <mark.rutland@....com>,
Namhyung Kim <namhyung@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Weilin Wang <weilin.wang@...el.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-perf-users@...r.kernel.org
Subject: [PATCH 1/1 v6.16] perf test event_uniquifying: Skip test on
platforms without 'clockticks' events
I'll add this to perf-tools for v6.16, please check.
- Arnaldo
---
This test assumes the 'clockticks' event is generally available, which
isn't the case, for instance, on AMD systems such as:
root@...ber:~# grep -m1 "model name" /proc/cpuinfo
model name : AMD Ryzen 9 9950X3D 16-Core Processor
root@...ber:~# perf list clockticks
List of pre-defined events (to be used in -e or -M):
root@...ber:~#
So skip this test when 'clockticks' isn't available.
This should be improved to find other events that are available in
multiple PMUs so that the intent of the test is achieved in more
platforms.
Fixes: cb422594d62066a5 ("perf test: Add stat uniquifying test")
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: Chun-Tse Shao <ctshao@...gle.com>
Cc: Dr. David Alan Gilbert <linux@...blig.org>
Cc: Howard Chu <howardchu95@...il.com>
Cc: Ian Rogers <irogers@...gle.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: James Clark <james.clark@...aro.org>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Kan Liang <kan.liang@...ux.intel.com>
Cc: Levi Yun <yeoreum.yun@....com>
Cc: Mark Rutland <mark.rutland@....com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Weilin Wang <weilin.wang@...el.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/tests/shell/stat+event_uniquifying.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/perf/tests/shell/stat+event_uniquifying.sh b/tools/perf/tests/shell/stat+event_uniquifying.sh
index 5ec35c52b7d9651e..20498b6eadb57702 100755
--- a/tools/perf/tests/shell/stat+event_uniquifying.sh
+++ b/tools/perf/tests/shell/stat+event_uniquifying.sh
@@ -49,6 +49,12 @@ test_event_uniquifying() {
uniquified_event_array+=("${uniquified_event}")
done < <(${perf_tool} list -v ${event} | grep "\[Kernel PMU event\]")
+ if [ ${#uniquified_event_array[@]} -eq 0 ]; then
+ echo "'clocktick' event not available on this machine"
+ err=2
+ return
+ fi
+
perf_command="${perf_tool} stat -e $event -A -o ${stat_output} -- true"
$perf_command
--
2.49.0
Powered by blists - more mailing lists