summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h
diff options
context:
space:
mode:
authorRobert Walker <robert.walker@arm.com>2018-12-03 13:18:46 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-12-17 18:56:18 +0100
commita7ee4d625ede4f62146ff3bb2aeee074e4cf5fa1 (patch)
tree8a483cf55c7b793667eb1bdccd4de53456fcc564 /tools/perf/util/cs-etm-decoder/cs-etm-decoder.h
parentperf beauty mmap_flags: Fixed syntax error Fixed missing ']' error (diff)
downloadlinux-a7ee4d625ede4f62146ff3bb2aeee074e4cf5fa1.tar.xz
linux-a7ee4d625ede4f62146ff3bb2aeee074e4cf5fa1.zip
perf cs-etm: Support for ARM A32/T32 instruction sets in CoreSight trace
This patch adds support for generating instruction samples from trace of AArch32 programs using the A32 and T32 instruction sets. T32 has variable 2 or 4 byte instruction size, so the conversion between addresses and instruction counts requires extra information from the trace decoder, requiring version 0.10.0 of OpenCSD. A check for the OpenCSD library version has been added to the feature check for OpenCSD. Signed-off-by: Robert Walker <robert.walker@arm.com> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Tested-by: Leo Yan <leo.yan@linaro.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1543839526-30348-1-git-send-email-robert.walker@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/cs-etm-decoder/cs-etm-decoder.h')
-rw-r--r--tools/perf/util/cs-etm-decoder/cs-etm-decoder.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h
index 612b5755f742..9351bd10d864 100644
--- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h
+++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h
@@ -28,11 +28,21 @@ enum cs_etm_sample_type {
CS_ETM_TRACE_ON = 1 << 1,
};
+enum cs_etm_isa {
+ CS_ETM_ISA_UNKNOWN,
+ CS_ETM_ISA_A64,
+ CS_ETM_ISA_A32,
+ CS_ETM_ISA_T32,
+};
+
struct cs_etm_packet {
enum cs_etm_sample_type sample_type;
+ enum cs_etm_isa isa;
u64 start_addr;
u64 end_addr;
+ u32 instr_count;
u8 last_instr_taken_branch;
+ u8 last_instr_size;
u8 exc;
u8 exc_ret;
int cpu;