Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf cs-etm: Treat EO_TRACE element as trace discontinuity

If the decoder outputs an EO_TRACE element, it means the end of the
trace buffer; this is a discontinuity and in this case the end of trace
data needs to be saved.

This patch generates a CS_ETM_DISCONTINUITY packet for the EO_TRACE
element hereby flushing the end of trace data in cs-etm.c.

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: coresight@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1544513908-16805-8-git-send-email-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Leo Yan and committed by
Arnaldo Carvalho de Melo
02e7e250 37bb3716

+1 -1
+1 -1
tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
··· 409 409 switch (elem->elem_type) { 410 410 case OCSD_GEN_TRC_ELEM_UNKNOWN: 411 411 break; 412 + case OCSD_GEN_TRC_ELEM_EO_TRACE: 412 413 case OCSD_GEN_TRC_ELEM_NO_SYNC: 413 414 case OCSD_GEN_TRC_ELEM_TRACE_ON: 414 415 resp = cs_etm_decoder__buffer_discontinuity(decoder, ··· 426 425 decoder->packet_buffer[decoder->tail].exc_ret = true; 427 426 break; 428 427 case OCSD_GEN_TRC_ELEM_PE_CONTEXT: 429 - case OCSD_GEN_TRC_ELEM_EO_TRACE: 430 428 case OCSD_GEN_TRC_ELEM_ADDR_NACC: 431 429 case OCSD_GEN_TRC_ELEM_TIMESTAMP: 432 430 case OCSD_GEN_TRC_ELEM_CYCLE_COUNT: