[SRU][N:gke][PATCH 060/106] perf cs-etm: Print error for new PERF_RECORD_AUX_OUTPUT_HW_ID versions

Tim Whisonant tim.whisonant at canonical.com
Mon Jul 21 16:21:43 UTC 2025


From: James Clark <james.clark at arm.com>

BugLink: https://bugs.launchpad.net/bugs/2117098

The likely fix for this is to update perf so print a helpful message.

Signed-off-by: James Clark <james.clark at arm.com>
Tested-by: Ganapatrao Kulkarni <gankulkarni at os.amperecomputing.com>
Acked-by: Anshuman Khandual <anshuman.khandual at arm.com>
Cc: Adrian Hunter <adrian.hunter at intel.com>
Cc: Alexander Shishkin <alexander.shishkin at linux.intel.com>
Cc: Alexandre Torgue <alexandre.torgue at foss.st.com>
Cc: Ian Rogers <irogers at google.com>
Cc: Ingo Molnar <mingo at redhat.com>
Cc: Jiri Olsa <jolsa at kernel.org>
Cc: John Garry <john.g.garry at oracle.com>
Cc: Leo Yan <leo.yan at linux.dev>
Cc: Mark Rutland <mark.rutland at arm.com>
Cc: Maxime Coquelin <mcoquelin.stm32 at gmail.com>
Cc: Mike Leach <mike.leach at linaro.org>
Cc: Namhyung Kim <namhyung at kernel.org>
Cc: Peter Zijlstra <peterz at infradead.org>
Cc: Steve Clevenger <scclevenger at os.amperecomputing.com>
Cc: Suzuki Poulouse <suzuki.poulose at arm.com>
Cc: Will Deacon <will at kernel.org>
Link: https://lore.kernel.org/r/20240429152207.479221-2-james.clark@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme at redhat.com>
(cherry picked from commit 0d2e3f251149b758458586df61578827eef7dc8d)
Signed-off-by: Tim Whisonant <tim.whisonant at canonical.com>
---
 tools/perf/util/cs-etm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index 9ad6dbd8772da..16efb80fe8658 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -335,8 +335,11 @@ static int cs_etm__process_aux_output_hw_id(struct perf_session *session,
 	trace_chan_id = FIELD_GET(CS_AUX_HW_ID_TRACE_ID_MASK, hw_id);
 
 	/* check that we can handle this version */
-	if (version > CS_AUX_HW_ID_CURR_VERSION)
+	if (version > CS_AUX_HW_ID_CURR_VERSION) {
+		pr_err("CS ETM Trace: PERF_RECORD_AUX_OUTPUT_HW_ID version %d not supported. Please update Perf.\n",
+		       version);
 		return -EINVAL;
+	}
 
 	/* get access to the etm metadata */
 	etm = container_of(session->auxtrace, struct cs_etm_auxtrace, auxtrace);
-- 
2.43.0




More information about the kernel-team mailing list