perf cs-etm: Suppress printing when resetting decoder
The decoder is quite noisy when being reset. In a future commit, dump-raw-trace will use a code path that resets the decoder rather than creating a new one, so printing has to be suppressed to not flood the output. Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: James Clark <james.clark@arm.com> Cc: Al Grant <al.grant@arm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Anshuman Khandual <anshuman.khandual@arm.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: John Garry <john.garry@huawei.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Suzuki Poulouse <suzuki.poulose@arm.com> Cc: Will Deacon <will@kernel.org> Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https //lore.kernel.org/r/20210721150202.32065-5-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
ca50db5917
commit
b8324f490b
@ -35,6 +35,7 @@
|
|||||||
struct cs_etm_decoder {
|
struct cs_etm_decoder {
|
||||||
void *data;
|
void *data;
|
||||||
void (*packet_printer)(const char *msg);
|
void (*packet_printer)(const char *msg);
|
||||||
|
bool suppress_printing;
|
||||||
dcd_tree_handle_t dcd_tree;
|
dcd_tree_handle_t dcd_tree;
|
||||||
cs_etm_mem_cb_type mem_access;
|
cs_etm_mem_cb_type mem_access;
|
||||||
ocsd_datapath_resp_t prev_return;
|
ocsd_datapath_resp_t prev_return;
|
||||||
@ -74,9 +75,10 @@ int cs_etm_decoder__reset(struct cs_etm_decoder *decoder)
|
|||||||
ocsd_datapath_resp_t dp_ret;
|
ocsd_datapath_resp_t dp_ret;
|
||||||
|
|
||||||
decoder->prev_return = OCSD_RESP_CONT;
|
decoder->prev_return = OCSD_RESP_CONT;
|
||||||
|
decoder->suppress_printing = true;
|
||||||
dp_ret = ocsd_dt_process_data(decoder->dcd_tree, OCSD_OP_RESET,
|
dp_ret = ocsd_dt_process_data(decoder->dcd_tree, OCSD_OP_RESET,
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL, NULL);
|
||||||
|
decoder->suppress_printing = false;
|
||||||
if (OCSD_DATA_RESP_IS_FATAL(dp_ret))
|
if (OCSD_DATA_RESP_IS_FATAL(dp_ret))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -146,8 +148,10 @@ static void cs_etm_decoder__print_str_cb(const void *p_context,
|
|||||||
const char *msg,
|
const char *msg,
|
||||||
const int str_len)
|
const int str_len)
|
||||||
{
|
{
|
||||||
if (p_context && str_len)
|
const struct cs_etm_decoder *decoder = p_context;
|
||||||
((struct cs_etm_decoder *)p_context)->packet_printer(msg);
|
|
||||||
|
if (p_context && str_len && !decoder->suppress_printing)
|
||||||
|
decoder->packet_printer(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user