Skip to content

Commit

Permalink
perf arm-spe: Store memory address in packet
Browse files Browse the repository at this point in the history
This patch is to store virtual and physical memory addresses in packet,
which will be used for memory samples.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: James Clark <james.clark@arm.com>
Tested-by: James Clark <james.clark@arm.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Al Grant <al.grant@arm.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wei Li <liwei391@huawei.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210211133856.2137-2-james.clark@arm.com
Signed-off-by: James Clark <james.clark@arm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Leo Yan authored and Arnaldo Carvalho de Melo committed Feb 12, 2021
1 parent 845d3a6 commit 265cfb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ static int arm_spe_read_record(struct arm_spe_decoder *decoder)
decoder->record.from_ip = ip;
else if (idx == SPE_ADDR_PKT_HDR_INDEX_BRANCH)
decoder->record.to_ip = ip;
else if (idx == SPE_ADDR_PKT_HDR_INDEX_DATA_VIRT)
decoder->record.virt_addr = ip;
else if (idx == SPE_ADDR_PKT_HDR_INDEX_DATA_PHYS)
decoder->record.phys_addr = ip;
break;
case ARM_SPE_COUNTER:
break;
Expand Down
2 changes: 2 additions & 0 deletions tools/perf/util/arm-spe-decoder/arm-spe-decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ struct arm_spe_record {
u64 from_ip;
u64 to_ip;
u64 timestamp;
u64 virt_addr;
u64 phys_addr;
};

struct arm_spe_insn;
Expand Down

0 comments on commit 265cfb9

Please sign in to comment.