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
Hi Arnaldo and Masami,

On Fri, Nov 20, 2015 at 09:10:44AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Nov 20, 2015 at 09:05:23AM +0000, 平松雅巳 / HIRAMATU,MASAMI escreveu:
> > >From: Namhyung Kim [mailto:namhyung@kernel.org]
> > >
> > >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.
> >
> > Hmm, I doubt that this can work for debugging situation, because
> > sometimes backtrace facilities has to debug itself by itself.
>
> That is a valid point, possibly we can have both and when we think that
> the code we rely on for resolving symbols has issues, activate the
> other, more expensive, binutils/elfutils spawned command line utilities
> to do compare the results?

Yeah, that's a possible solution. We can start by using our own, and
if there's a certain amount of failure in symbol resolving, then
fallback to glibc's backtrace_symbols + addr2line.


>
> > For the some (static) functions, I'd rather like to use glibc's
> > backtrace_symbols and addr2line or even with raw address for
> > reliability...

I also printed the raw addresses in case of doubts, so you could
verify its correctness. :) And IMHO, if something is severely broken,
we might not rely on glibc too.

Having said that, I agree with your concern and it needs the fallback
method for possible malfunction. But I guess it'd work quite well for
most cases so it's worth trying to convert using it. I'll work on the
fallback method then..

Thanks,
Namhyung


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