[PATCH 1/6] perf: cs-etm: Don't add global v0 HW_IDs to unformatted queues

James Clark james.clark at linaro.org
Thu Oct 1 03:34:11 PDT 2026



On 04/09/2026 17:43, Leo Yan wrote:
> On Fri, Aug 21, 2026 at 10:50:29AM +0100, James Clark wrote:
>> In the case of mixed formatted and unformatted trace with v0 HW_IDs, or
>> no HW_IDs at all resulting in the cs_etm__map_trace_ids_metadata()
>> fallback, formatted queues will write their HW_IDs to unformatted
>> queues.
> 
> I understand a session can support multiple sinks, but I don't expect
> to mix up formatted and unformatted trace (see sinks_compatible()).
> 

But sinks_compatible() is only called multiple times for per-thread 
sessions. For per-CPU, userspace opens separate events per-CPU. If the 
user doesn't specify a sink then the default one is chosen which can be 
a different type for each CPU/path.

> For the mentioned fallback, I am also struggling to establish a case.
> Even AUX_OUTPUT_HW_ID records are absent randomly, I don't think this
> impacts the queue's format initalization, no?

The fallback uses the metadata only, without sink information, which is 
equivalent to v0 records. So it's just another way to trigger the same 
problem.

If you're using global v0 mappings, then we assume that all trace IDs 
are possible in all queues, which results in multiple decoders being 
created and triggers an error in OpenCSD once it sees that being 
combined with unformatted.




More information about the linux-arm-kernel mailing list