[PATCH 08/34] perf cs-etm: arm-spe: Use arch timestamp in HW tracers

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


To allow the JIT dump records to be correlated with the HW timestamp in
trace, set JITDUMP_USE_ARCH_TIMESTAMP.

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

diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c
index 84a5d7392a5f..809da6f1a892 100644
--- a/tools/perf/arch/arm/util/cs-etm.c
+++ b/tools/perf/arch/arm/util/cs-etm.c
@@ -909,6 +909,11 @@ struct auxtrace_record *cs_etm_record_init(int *err)
 		goto out;
 	}
 
+	if (setenv("JITDUMP_USE_ARCH_TIMESTAMP", "1", 1)) {
+		*err = -errno;
+		return NULL;
+	}
+
 	ptr = zalloc(sizeof(struct cs_etm_recording));
 	if (!ptr) {
 		*err = -ENOMEM;
diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c
index 8d6a2bde2892..53899c7de846 100644
--- a/tools/perf/arch/arm64/util/arm-spe.c
+++ b/tools/perf/arch/arm64/util/arm-spe.c
@@ -521,6 +521,11 @@ struct auxtrace_record *arm_spe_recording_init(int *err,
 		return NULL;
 	}
 
+	if (setenv("JITDUMP_USE_ARCH_TIMESTAMP", "1", 1)) {
+		*err = -errno;
+		return NULL;
+	}
+
 	sper = zalloc(sizeof(struct arm_spe_recording));
 	if (!sper) {
 		*err = -ENOMEM;

-- 
2.43.0




More information about the linux-arm-kernel mailing list