[PATCH v3 04/18] perf cs-etm: Use per-CPU queues for per-thread mode

Leo Yan leo.yan at arm.com
Thu Nov 5 02:54:15 PST 2026


On Wed, Nov 04, 2026 at 03:07:24PM +0000, James Clark wrote:

[...]

> > Why not use PERF_RECORD_AUX events as an opportunity to update threads,
> > similar to how we handle PERF_RECORD_SWITCH_CPU_WIDE?
> > 
> 
> In cs_etm__queue_aux_fragment() we check if the TID from the AUX record is
> the same as the one on the buffer, so it doesn't make a difference. They're
> always the same:
> 
> 		if (auxtrace_event->tid != sample->tid)
> 			return 1;
> 
> We can't use it directly in cs_etm__process_event() because we're not
> decoding in order with Perf events yet. In my WIP JIT patches we do, but it
> still makes sense to continue to use the TID from the buffer because you
> don't always have timestamps available to update threads when the AUX event
> comes.

Makes sense. Thanks for the explanation.

Reviewed-by: Leo Yan <leo.yan at arm.com>



More information about the linux-arm-kernel mailing list