Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf cs-etm: Print unknown header version as an error

This is an error rather than just for the raw trace dump so always print
it as an error. Also remove the duplicate header version check.

Signed-off-by: James Clark <james.clark@arm.com>
Cc: Al Grant <Al.Grant@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.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@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: coresight@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20221212155513.2259623-2-james.clark@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

James Clark and committed by
Arnaldo Carvalho de Melo
ab6bd55e 22ddcb6b

+2 -10
+2 -10
tools/perf/util/cs-etm.c
··· 2623 2623 { 2624 2624 int i, cpu = 0, version, err; 2625 2625 2626 - /* bail out early on bad header version */ 2627 2626 version = val[0]; 2628 - if (version > CS_HEADER_CURRENT_VERSION) { 2629 - /* failure.. return */ 2630 - fprintf(stdout, " Unknown Header Version = %x, ", version); 2631 - fprintf(stdout, "Version supported <= %x\n", CS_HEADER_CURRENT_VERSION); 2632 - return; 2633 - } 2634 2627 2635 2628 for (i = 0; i < CS_HEADER_VERSION_MAX; i++) 2636 2629 fprintf(stdout, cs_etm_global_header_fmts[i], val[i]); ··· 2909 2916 /* Look for version of the header */ 2910 2917 hdr_version = ptr[0]; 2911 2918 if (hdr_version > CS_HEADER_CURRENT_VERSION) { 2912 - /* print routine will print an error on bad version */ 2913 - if (dump_trace) 2914 - cs_etm__print_auxtrace_info(auxtrace_info->priv, 0); 2919 + pr_err("\nCS ETM Trace: Unknown Header Version = %#" PRIx64, hdr_version); 2920 + pr_err(", version supported <= %x\n", CS_HEADER_CURRENT_VERSION); 2915 2921 return -EINVAL; 2916 2922 } 2917 2923