From: James Clark <james.clark@linaro.org>
To: Leo Yan <leo.yan@arm.com>
Cc: John Garry <john.g.garry@oracle.com>,
Will Deacon <will@kernel.org>, Mike Leach <mike.leach@arm.com>,
Leo Yan <leo.yan@linux.dev>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Suyash Mahar <smahar@meta.com>, Amir Ayupov <aaupov@fb.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] perf cs-etm: Synthesize missing HW_ID mappings for raw trace
Date: Thu, 1 Oct 2026 13:55:23 +0100 [thread overview]
Message-ID: <28c735f7-5d1c-4127-b748-99cdb3b48645@linaro.org> (raw)
In-Reply-To: <20260904172924.GB8904@e132581.arm.com>
On 04/09/2026 18:29, Leo Yan wrote:
> On Fri, Aug 21, 2026 at 10:50:31AM +0100, James Clark wrote:
>
> [...]
>
>> +static int cs_etm__synth_unformatted_trace_ids(struct cs_etm_auxtrace *etm)
>> +{
>> + struct auxtrace_queues *queues = &etm->queues;
>> +
>> + for (unsigned int i = 0; i < queues->nr_queues; i++) {
>> + struct auxtrace_queue *queue = &queues->queue_array[i];
>> + struct cs_etm_queue *etmq = queue->priv;
>> + u64 *cpu_data;
>> + u8 trace_id;
>> + int ret;
>> +
>> + if (list_empty(&queue->head) || !etmq || etmq->format != UNFORMATTED)
>> + continue;
>> +
>> + if (!intlist__empty(etmq->traceid_list))
>> + continue;
>> +
>> + cpu_data = get_cpu_data(etm, queue->cpu);
>> + if (!cpu_data)
>> + return -EINVAL;
>> +
>> + ret = cs_etm__metadata_get_trace_id(&trace_id, cpu_data);
>> + if (ret)
>> + return ret;
>
> Since this is an unformatted queue, can we simply ignore the trace ID?
> Instead of fetching it from the metadata, we could insert 0 to create
> the trace ID list.
>
It's printed in the raw output though and it's useful for eyeballing
which CPU any bit of trace ran on because the AUXTRACE header might be
off the page, and it makes output consistent with ETM:
. ... CoreSight ETE Trace data: size 0x10000 bytes
Idx:0; ID:22; I_ASYNC : Alignment Synchronisation.
I don't think it costs anything or is complex to do this, but if you
really want to set them all to 0 we could do it.
> This would also align with future refactoring to remove trace ID
> handling for unformatted queues.
At that point if they're all going to be 0 then we can ignore all
processing of HW_ID events for UNFORMATTED. Instead of saying
cs_etm__synth_unformatted_trace_ids() is for 'fixing up missing IDs' it
just creates them outright.
next prev parent reply other threads:[~2026-10-01 12:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 9:50 [PATCH 0/6] perf: cs-etm: HW_ID improvements James Clark
2026-08-21 9:50 ` [PATCH 1/6] perf: cs-etm: Don't add global v0 HW_IDs to unformatted queues James Clark
2026-09-04 16:43 ` Leo Yan
2026-10-01 10:34 ` James Clark
2026-08-21 9:50 ` [PATCH 2/6] perf cs-etm: Free partially created queues James Clark
2026-09-04 17:12 ` Leo Yan
2026-10-01 10:40 ` James Clark
2026-08-21 9:50 ` [PATCH 3/6] perf cs-etm: Synthesize missing HW_ID mappings for raw trace James Clark
2026-09-04 17:29 ` Leo Yan
2026-10-01 12:55 ` James Clark [this message]
2026-08-21 9:50 ` [PATCH 4/6] perf: cs-etm: Respect --no-itrace option James Clark
2026-08-24 9:53 ` Adrian Hunter
2026-09-04 17:45 ` Leo Yan
2026-10-01 12:57 ` James Clark
2026-08-21 9:50 ` [PATCH 5/6] perf/core: Return errors from perf_report_aux_output_id() James Clark
2026-08-21 9:50 ` [PATCH 6/6] coresight: perf: Retry failed HW_ID writes James Clark
2026-08-21 10:01 ` James Clark
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=28c735f7-5d1c-4127-b748-99cdb3b48645@linaro.org \
--to=james.clark@linaro.org \
--cc=aaupov@fb.com \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=irogers@google.com \
--cc=john.g.garry@oracle.com \
--cc=jolsa@kernel.org \
--cc=leo.yan@arm.com \
--cc=leo.yan@linux.dev \
--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=smahar@meta.com \
--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