From: James Clark Date: Mon, 29 Apr 2024 15:21:46 +0000 (+0100) Subject: perf cs-etm: Print error for new PERF_RECORD_AUX_OUTPUT_HW_ID versions X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0d2e3f251149b758458586df61578827eef7dc8d;p=linux.git 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 Tested-by: Ganapatrao Kulkarni Acked-by: Anshuman Khandual Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Maxime Coquelin Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steve Clevenger Cc: Suzuki Poulouse Cc: Will Deacon Link: https://lore.kernel.org/r/20240429152207.479221-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index d65d7485886cd..32818bd7cd177 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);