[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250128150307.1129522-1-tmricht@linux.ibm.com>
Date: Tue, 28 Jan 2025 16:03:07 +0100
From: Thomas Richter <tmricht@...ux.ibm.com>
To: linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
acme@...nel.org, james.clark@...aro.org, namhyung@...nel.org
Cc: agordeev@...ux.ibm.com, gor@...ux.ibm.com, sumanthk@...ux.ibm.com,
hca@...ux.ibm.com, Thomas Richter <tmricht@...ux.ibm.com>
Subject: [PATCH] perf test: Fix perf test 114 perf record test for s390
On s390 the event instructions can not be used for recording.
This event is only supported by perf stat.
Skip all tests which use perf record -e instruction ....
Cc: James Clark <james.clark@...aro.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Signed-off-by: Thomas Richter <tmricht@...ux.ibm.com>
---
tools/perf/tests/shell/record.sh | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
index 0fc7a909ae9b..297d0e459875 100755
--- a/tools/perf/tests/shell/record.sh
+++ b/tools/perf/tests/shell/record.sh
@@ -287,11 +287,15 @@ 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
+ # On s390 event instructions can not be used for recording
+ if [ $(uname -m) != s390x ]
then
- echo "precise_max attribute [Failed instructions:P event]"
- err=1
- return
+ if ! perf record -o "${perfdata}" -e "instructions:P" true 2> /dev/null
+ then
+ echo "precise_max attribute [Failed instructions:P event]"
+ err=1
+ return
+ fi
fi
echo "precise_max attribute test [Success]"
}
@@ -307,7 +311,8 @@ test_system_wide
test_workload
test_branch_counter
test_cgroup
-test_leader_sampling
+# On s390 event instructions can not be used for recording
+[ $(uname -m) != s390x ] && test_leader_sampling
test_topdown_leader_sampling
test_precise_max
--
2.48.1
Powered by blists - more mailing lists