perf cs-etm: Add traceID in packet
authorLeo Yan <leo.yan@linaro.org>
Tue, 29 Jan 2019 12:28:40 +0000 (20:28 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 6 Feb 2019 13:00:40 +0000 (10:00 -0300)
Add traceID in packet, thus we can use traceID to retrieve metadata
pointer from traceID-metadata tuple.

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: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Robert Walker <robert.walker@arm.com>
Cc: Suzuki K Poulouse <suzuki.poulose@arm.com>
Cc: coresight ml <coresight@lists.linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20190129122842.32041-7-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
tools/perf/util/cs-etm-decoder/cs-etm-decoder.h

index cdd38ffd10d23783a99d1dcb85205fa149904c5b..ba4c623cd8de0d00f89ba452efe5b91569c9c794 100644 (file)
@@ -295,6 +295,7 @@ static void cs_etm_decoder__clear_buffer(struct cs_etm_decoder *decoder)
                decoder->packet_buffer[i].last_instr_cond = 0;
                decoder->packet_buffer[i].flags = 0;
                decoder->packet_buffer[i].exception_number = UINT32_MAX;
+               decoder->packet_buffer[i].trace_chan_id = UINT8_MAX;
                decoder->packet_buffer[i].cpu = INT_MIN;
        }
 }
@@ -331,6 +332,7 @@ cs_etm_decoder__buffer_packet(struct cs_etm_decoder *decoder,
        decoder->packet_buffer[et].last_instr_cond = 0;
        decoder->packet_buffer[et].flags = 0;
        decoder->packet_buffer[et].exception_number = UINT32_MAX;
+       decoder->packet_buffer[et].trace_chan_id = trace_chan_id;
 
        if (decoder->packet_count == MAX_BUFFER - 1)
                return OCSD_RESP_WAIT;
index 012b4728a46f8005dfdec72e33e4706f32c8efa9..7e6a8850be4a433ee981d28652a6e3b1f63c0e85 100644 (file)
@@ -50,6 +50,7 @@ struct cs_etm_packet {
        u8 last_instr_cond;
        u8 last_instr_taken_branch;
        u8 last_instr_size;
+       u8 trace_chan_id;
        int cpu;
 };