]> www.infradead.org Git - linux.git/commitdiff
perf arm-spe: Set sample.addr to target address for instruction sample
authorGraham Woodward <graham.woodward@arm.com>
Fri, 25 Oct 2024 14:30:06 +0000 (15:30 +0100)
committerNamhyung Kim <namhyung@kernel.org>
Tue, 29 Oct 2024 23:10:05 +0000 (16:10 -0700)
For an instruction sample, assign the target address to the field
'to_ip'.
If it is a non-branch record, to_ip will be 0, presenting a non-valid
target address.

Signed-off-by: Graham Woodward <graham.woodward@arm.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Tested-by: Leo Yan <leo.yan@arm.com>
Cc: nd@arm.com
Cc: mike.leach@linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20241025143009.25419-2-graham.woodward@arm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/arm-spe.c

index 856cc36f33d79184c51d6d327fadb4b79cbb01da..49b76380736009c928ca3a6f0d499aeee3466965 100644 (file)
@@ -418,7 +418,7 @@ static int arm_spe__synth_instruction_sample(struct arm_spe_queue *speq,
 
        sample.id = spe_events_id;
        sample.stream_id = spe_events_id;
-       sample.addr = record->virt_addr;
+       sample.addr = record->to_ip;
        sample.phys_addr = record->phys_addr;
        sample.data_src = data_src;
        sample.period = spe->instructions_sample_period;