Re: [PATCH] perf auxtrace: Fix auxtrace queue conflict

From: Andi Kleen
Date: Mon Mar 08 2021 - 11:55:15 EST


On Mon, Mar 08, 2021 at 05:11:43PM +0200, Adrian Hunter wrote:
> The only requirement of an auxtrace queue is that the buffers are in
> time order. That is achieved by making separate queues for separate
> perf buffer or AUX area buffer mmaps.
>
> That generally means a separate queue per cpu for per-cpu contexts,
> and a separate queue per thread for per-task contexts.
>
> When buffers are added to a queue, perf checks that the buffer cpu
> and thread id (tid) match the queue cpu and thread id.
>
> However, generally, that need not be true, and perf will queue
> buffers correctly anyway, so the check is not needed.
>
> In addition, the check gets erroneously hit when using sample mode
> to trace multiple threads.
>
> Consequently, fix that case by removing the check.

Thanks!

Reviewed-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>

-Andi