perf cs-etm: Support dummy address value for CS_ETM_TRACE_ON packet
authorLeo Yan <leo.yan@linaro.org>
Wed, 11 Jul 2018 07:45:43 +0000 (15:45 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 31 Jul 2018 13:58:29 +0000 (10:58 -0300)
commit6035b6804bdfd662c8ee6226dc90f3764060ec73
tree841fa8270979ae946630504085a8babbc2f86d95
parent3eb3e07bcfee0670d7142f839c76f33f3d265793
perf cs-etm: Support dummy address value for CS_ETM_TRACE_ON packet

For CS_ETM_TRACE_ON packet, its fields 'packet->start_addr' and
'packet->end_addr' equal to 0xdeadbeefdeadbeefUL which are emitted in
the decoder layer as dummy value, but the dummy value is pointless for
branch sample when we use 'perf script' command to check program flow.

This patch is a preparation to support CS_ETM_TRACE_ON packet for branch
sample, it converts the dummy address value to zero for more readable;
this is accomplished by cs_etm__last_executed_instr() and
cs_etm__first_executed_instr().  The later one is a new function
introduced by this patch.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kim Phillips <kim.phillips@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Walker <robert.walker@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1531295145-596-5-git-send-email-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/cs-etm.c