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@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;