Re: [PATCH v4 05/53] perf machine thread: Remove exited threads by default

From: Arnaldo Carvalho de Melo
Date: Wed Nov 08 2023 - 11:04:51 EST


Em Mon, Nov 06, 2023 at 01:28:43PM +0200, Adrian Hunter escreveu:
> On 2/11/23 19:56, Ian Rogers wrote:
> > struct thread values hold onto references to mmaps, dsos, etc. When a
> > thread exits it is necessary to clean all of this memory up by
> > removing the thread from the machine's threads. Some tools require
> > this doesn't happen, such as auxtrace events, perf report if offcpu
> > events exist or if a task list is being generated, so add a
> > symbol_conf value to make the behavior optional. When an exited thread
> > is left in the machine's threads, mark it as exited.
> >
> > This change relates to commit 40826c45eb0b ("perf thread: Remove
> > notion of dead threads"). Dead threads were removed as they had a
> > reference count of 0 and were difficult to reason about with the
> > reference count checker. Here a thread is removed from threads when it
> > exits, unless via symbol_conf the exited thread isn't remove and is
> > marked as exited. Reference counting behaves as it normally does.
> >
> > Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
>
> For auxtrace:
>
> Reviewed-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>

Thanks, applied to perf-tools-next.

- Arnaldo