From: Leo Yan <leo.yan@arm.com>
To: Mike Leach <mike.leach@arm.com>
Cc: linux-perf-users@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org,
linux-kernel@vger.kernel.org, acme@kernel.org,
suzuki.poulose@arm.com, leo.yan@linaro.org, peterz@infradead.org,
mingo@redhat.com, will@kernel.org, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@redhat.com,
namhyung@kernel.org
Subject: Re: [PATCH 1/2] perf: tools: cs-etm: Fix print issue for Coresight debug in ETE/TRBE trace
Date: Fri, 13 Mar 2026 14:42:39 +0000 [thread overview]
Message-ID: <20260313144239.GM4153946@e132581.arm.com> (raw)
In-Reply-To: <20260313132129.2743468-2-mike.leach@arm.com>
On Fri, Mar 13, 2026 at 01:21:28PM +0000, Mike Leach wrote:
> Building perf with CORESIGHT=1 and the optional CSTRACE_RAW=1 enables
> additional debug printing of raw trace data when using command:-
> perf report --dump.
>
> This raw trace prints the CoreSight formatted trace frames, which may be
> used to investigate suspected issues with trace quality / corruption /
> decode.
>
> These frames are not present in ETE + TRBE trace.
> This fix removes the unnecessary call to print these frames.
>
> Due to an addtional fault with the OpenCSD library, this call when ETE/TRBE
> are being decoded will cause a segfault in perf. This fix also prevents
> that problem for perf using older (<= 1.8.0 version) OpenCSD libraries.
Thanks for patches!
> Fixes: 68ffe3902898 ("perf tools: Add decoder mechanic to support dumping trace data")
>
Redundant empty line.
> Reported-by: Leo Yan <leo.yan@arm.com>
> Signed-off-by: Mike Leach <mike.leach@arm.com>
> ---
> tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> 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 3050fe212666..f7e89693cf16 100644
> --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
> +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
> @@ -739,7 +739,8 @@ cs_etm_decoder__new(int decoders, struct cs_etm_decoder_params *d_params,
> goto err_free_decoder;
>
> /* init raw frame logging if required */
> - cs_etm_decoder__init_raw_frame_logging(d_params, decoder);
> + if (format == OCSD_TRC_SRC_FRAME_FORMATTED)
> + cs_etm_decoder__init_raw_frame_logging(d_params, decoder);
Could we improve a bit to add checking in
cs_etm_decoder__init_raw_frame_logging(), something like:
cs_etm_decoder__init_raw_frame_logging(struct cs_etm_decoder_params *d_params,
struct cs_etm_decoder *decoder)
{
+ /* No formatted trace frames */
+ if (!d_params->formatted)
+ return;
Sorry I should have mentioned this early.
>
> for (i = 0; i < decoders; i++) {
> ret = cs_etm_decoder__create_etm_decoder(d_params,
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-03-13 14:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 13:21 [PATCH 0/2] perf: tools: cs-etm: Fixes for CoreSight debug dump Mike Leach
2026-03-13 13:21 ` [PATCH 1/2] perf: tools: cs-etm: Fix print issue for Coresight debug in ETE/TRBE trace Mike Leach
2026-03-13 14:42 ` Leo Yan [this message]
2026-03-17 15:09 ` Mike Leach
2026-03-13 13:21 ` [PATCH 2/2] perf: tools: cs-etm: Enhance raw Coresight trace debug display Mike Leach
2026-03-13 14:45 ` Leo Yan
2026-03-18 12:56 ` Arnaldo Carvalho de Melo
2026-03-18 18:45 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260313144239.GM4153946@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=jolsa@redhat.com \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mike.leach@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox