lkml.org 
[lkml]   [2015]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC/PATCH] perf tools: Introduce perf_thread for backtrace
On Mon, Nov 23, 2015 at 06:39:36PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Nov 20, 2015 at 03:03:03PM +0900, Namhyung Kim escreveu:
> > Backtrace is a crucial info for debugging. And upcoming refcnt
> > tracking facility also wants to use it.
> >
> > So instead of relying on glibc's backtrace_symbols[_fd] which misses
> > some (static) functions , use our own symbol searching mechanism. To
> > do that, add perf_thread global variable to keep its maps and symbols.
> >
> > The backtrace output from TUI is changed like below. (I made a key
> > action to generate a segfault for testing):
>
> This is a really nice use of what we have, I guess we could simplify
> things further, not having to create a struct machine, as we have just
> one thread, and we're not interested in kernel addresses, so no need for
> kmaps, etc.

Yes, I thought about it. But as adding the perf thread to an existing
machine can affect other thread(s), I didn't do it. Maybe we can set
the perf threads' machine pointer in a hacky way without adding the
thread into the machine, but I'd rather not doing that too because
it's fragile and current code is simple enough IMHO.


>
> But as-is it already looks better than what we were using :-)
>
> I'll try testing it further and will probably switch to using it if
> nobody voices any problem we haven't realised with such approach.

Thank you!
Namhyung


\
 
 \ /
  Last update: 2015-11-24 09:01    [W:0.065 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site