[PATCH 09/34] perf cs-etm: arm-spe: Report error if default clock isn't used

James Clark james.clark at linaro.org
Wed Nov 18 08:29:31 PST 2026


Coresight already reported an error if a different clock was used, but
this also applies to SPE so add the same error there.

Signed-off-by: James Clark <james.clark at linaro.org>
---
 tools/perf/arch/arm/util/cs-etm.c    | 2 +-
 tools/perf/arch/arm64/util/arm-spe.c | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c
index 809da6f1a892..5a64c17cf254 100644
--- a/tools/perf/arch/arm/util/cs-etm.c
+++ b/tools/perf/arch/arm/util/cs-etm.c
@@ -365,7 +365,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr,
 		return ret;
 
 	if (opts->use_clockid) {
-		pr_err("Cannot use clockid (-k option) with %s\n",
+		pr_err("Cannot use clockid (-k option) with %s, can only correlate samples with the default clock.\n",
 		       CORESIGHT_ETM_PMU_NAME);
 		return -EINVAL;
 	}
diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c
index 53899c7de846..834419f04617 100644
--- a/tools/perf/arch/arm64/util/arm-spe.c
+++ b/tools/perf/arch/arm64/util/arm-spe.c
@@ -416,6 +416,12 @@ static int arm_spe_recording_options(struct auxtrace_record *itr,
 				       evsel->pmu->name);
 				return -EINVAL;
 			}
+
+			if (opts->use_clockid) {
+				pr_err("Cannot use clockid (-k option) with %s, can only correlate samples with the default clock.\n",
+				       evsel->pmu->name);
+				return -EINVAL;
+			}
 		}
 	}
 

-- 
2.43.0




More information about the linux-arm-kernel mailing list