summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Woodward <graham.woodward@arm.com>2024-10-25 15:30:06 +0100
committerNamhyung Kim <namhyung@kernel.org>2024-10-29 16:10:05 -0700
commit19966d792b9e6b055aeb2f0e573b4d4573d5e15b (patch)
tree12c407133f9e3e6bdaa5862822ace46aa696acbd
parente3b2949e3fa2fd8c19cd5fbb0424d38f70a70e9c (diff)
perf arm-spe: Set sample.addr to target address for instruction sample
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>
-rw-r--r--tools/perf/util/arm-spe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c
index 856cc36f33d7..49b763807360 100644
--- a/tools/perf/util/arm-spe.c
+++ b/tools/perf/util/arm-spe.c
@@ -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;