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@arm.com