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 <[email protected]> Tested-by: Ganapatrao Kulkarni <[email protected]> Acked-by: Anshuman Khandual <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Alexandre Torgue <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: John Garry <[email protected]> Cc: Leo Yan <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Maxime Coquelin <[email protected]> Cc: Mike Leach <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Steve Clevenger <[email protected]> Cc: Suzuki Poulouse <[email protected]> Cc: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 36e8aa9 commit 0d2e3f2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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)