[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <51F683D2.3020901@gmail.com>
Date: Mon, 29 Jul 2013 09:01:38 -0600
From: David Ahern <dsahern@...il.com>
To: Adrian Hunter <adrian.hunter@...el.com>
CC: acme@...stprotocols.net, linux-kernel@...r.kernel.org,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...nel.org>, Jiri Olsa <jolsa@...hat.com>,
Mike Galbraith <efault@....de>,
Namhyung Kim <namhyung@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] perf: sample after exit loses thread correlation
On 7/29/13 4:29 AM, Adrian Hunter wrote:
>> When perf processes the EXIT event the thread is moved to the
>> dead_threads
>> list. When the SAMPLE event is processed no thread exists for the pid
>> so a new
>> one is created by machine__findnew_thread.
>
> In the case of per-cpu recording, it is normal for sample events to
> occur after the EXIT event simply because the EXIT event is recorded
> while the task is still running (in kernel). It is therefore a mistake
> to move the thread to dead_threads just because of the EXIT event.
>
> Instead the thread should be marked as exiting and not moved to
> dead_threads until another thread starts on the same CPU. i.e. a comm,
> mmap, fork event with the same tid and same CPU, or any event with a
> different tid and same CPU.
>
Interesting idea -- delaying the move to the dead-threads list.
Following solves the problem as well.
View attachment "a.patch" of type "text/plain" (2038 bytes)
Powered by blists - more mailing lists