提交 f3c33cbd 编写于 作者: J James Clark 提交者: Arnaldo Carvalho de Melo

perf cs-etm: Improve Coresight zero timestamp warning

Only show the warning if the user hasn't already set timeless mode and
improve the text because there was ambiguity around the meaning of '...'

Change the warning to a UI warning instead of printing straight to
stderr because this corrupts the UI when perf report TUI is used. The UI
warning function also handles printing to stderr when in perf script
mode.
Suggested-by: NLeo Yan <leo.yan@linaro.org>
Signed-off-by: NJames Clark <james.clark@arm.com>
Reviewed-by: NLeo Yan <leo.yan@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
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: Mathieu Poirier <mathieu.poirier@linaro.org>
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: http://lore.kernel.org/lkml/20210729155805.2830-6-james.clark@arm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 11552049
...@@ -328,8 +328,11 @@ cs_etm_decoder__do_hard_timestamp(struct cs_etm_queue *etmq, ...@@ -328,8 +328,11 @@ cs_etm_decoder__do_hard_timestamp(struct cs_etm_queue *etmq,
* underflow. * underflow.
*/ */
packet_queue->cs_timestamp = 0; packet_queue->cs_timestamp = 0;
WARN_ONCE(true, "Zero Coresight timestamp found at Idx:%" OCSD_TRC_IDX_STR if (!cs_etm__etmq_is_timeless(etmq))
". Decoding may be improved with --itrace=Z...\n", indx); pr_warning_once("Zero Coresight timestamp found at Idx:%" OCSD_TRC_IDX_STR
". Decoding may be improved by prepending 'Z' to your current --itrace arguments.\n",
indx);
} else if (packet_queue->instr_count > elem->timestamp) { } else if (packet_queue->instr_count > elem->timestamp) {
/* /*
* Sanity check that the elem->timestamp - packet_queue->instr_count would not * Sanity check that the elem->timestamp - packet_queue->instr_count would not
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册