Skip to content

Commit 0d2e3f2

Browse files
James-A-Clarkacmel
authored andcommitted
perf cs-etm: Print error for new PERF_RECORD_AUX_OUTPUT_HW_ID versions
The likely fix for this is to update perf so print a helpful message. Signed-off-by: James Clark <james.clark@arm.com> Tested-by: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com> Acked-by: Anshuman Khandual <anshuman.khandual@arm.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steve Clevenger <scclevenger@os.amperecomputing.com> Cc: Suzuki Poulouse <suzuki.poulose@arm.com> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20240429152207.479221-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 36e8aa9 commit 0d2e3f2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tools/perf/util/cs-etm.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,11 @@ static int cs_etm__process_aux_output_hw_id(struct perf_session *session,
335335
trace_chan_id = FIELD_GET(CS_AUX_HW_ID_TRACE_ID_MASK, hw_id);
336336

337337
/* check that we can handle this version */
338-
if (version > CS_AUX_HW_ID_CURR_VERSION)
338+
if (version > CS_AUX_HW_ID_CURR_VERSION) {
339+
pr_err("CS ETM Trace: PERF_RECORD_AUX_OUTPUT_HW_ID version %d not supported. Please update Perf.\n",
340+
version);
339341
return -EINVAL;
342+
}
340343

341344
/* get access to the etm metadata */
342345
etm = container_of(session->auxtrace, struct cs_etm_auxtrace, auxtrace);

0 commit comments

Comments
 (0)