Message ID | 20190119014347.27441-7-leo.yan@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | perf cs-etm: Add support for sample flags | expand |
On Sat, Jan 19, 2019 at 09:43:45AM +0800, Leo Yan wrote: > 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> > --- > tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 2 ++ > tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 1 + > 2 files changed, 3 insertions(+) > > diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c > index cdd38ffd10d2..ba4c623cd8de 100644 > --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c > +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c > @@ -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; > 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 012b4728a46f..7e6a8850be4a 100644 > --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h > +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h > @@ -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; Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> > }; > > -- > 2.17.1 >
diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c index cdd38ffd10d2..ba4c623cd8de 100644 --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c @@ -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; 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 012b4728a46f..7e6a8850be4a 100644 --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.h @@ -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; };
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> --- tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 2 ++ tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 1 + 2 files changed, 3 insertions(+) -- 2.17.1