[lkml]   [2015]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH V6 02/17] perf tools: Ensure thread-stack is flushed
On 19/06/2015 12:56 a.m., Arnaldo Carvalho de Melo wrote:
> Em Fri, May 29, 2015 at 04:33:30PM +0300, Adrian Hunter escreveu:
>> The thread-stack represents a thread's current stack. When
>> a thread exits there can still be many functions on the stack
>> e.g. exit() can be called many levels deep, so all the callers
>> will never return. To get that information output, the
>> thread-stack must be flushed.
>> Previously it was assumed the thread-stack would be flushed
>> when the struct thread was deleted. With thread ref-counting
>> it is no longer clear when that will be, if ever. So instead
> It'll be when the last reference to that thread is released.
> - Arnaldo
>> explicitly flush all the thread-stacks at the end of a session.
> If after the session ends you have no more need for those thread stacks,
> that is the right way to do it.
> With tools like 'report', after the session ends we should have all the
> unreferenced threads deleted.
> Previously they were not being deleted at all, i.e. they were simply
> moved to the dead_threads list and sat there because I didn't knew if
> some hist_entry, say, had a pointer to it.
> So, unless I am missing something, this patch is required irrespective
> of thread refcounting, no?

IIRC we used to delete all the dead threads too, but explicit flushing is better in any case.

> I'm applying it to my work branch where I'm trying to test all this.

Thank you!

 \ /
  Last update: 2015-06-19 08:21    [W:0.055 / U:20.356 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site