[PATCH 02/14] perf cs-etm: Warn for invalid timestamp option
James Clark
james.clark at linaro.org
Tue Aug 11 08:30:05 PDT 2026
Instead of silently returning an error, print a useful warning.
Signed-off-by: James Clark <james.clark at linaro.org>
---
tools/perf/arch/arm/util/cs-etm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c
index d2861d66a661..acfdb3f53821 100644
--- a/tools/perf/arch/arm/util/cs-etm.c
+++ b/tools/perf/arch/arm/util/cs-etm.c
@@ -176,8 +176,11 @@ static int cs_etm_validate_timestamp(struct perf_pmu *cs_etm_pmu, struct evsel *
* 0b01000 Implementation supports a maximum timestamp of 64bits.
*/
trcidr0 &= GENMASK(28, 24);
- if (!trcidr0)
+ if (!trcidr0) {
+ pr_err("%s: timestamp not supported by HW, disable with %s/timestamp=0/\n",
+ CORESIGHT_ETM_PMU_NAME, CORESIGHT_ETM_PMU_NAME);
return -EINVAL;
+ }
return 0;
}
--
2.43.0
More information about the linux-arm-kernel
mailing list