public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: "平松雅巳 / HIRAMATU,MASAMI" <masami.hiramatsu.pt@hitachi.com>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
	"Jiri Olsa" <jolsa@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"David Ahern" <dsahern@gmail.com>,
	"Frederic Weisbecker" <fweisbec@gmail.com>
Subject: Re: [RFC/PATCH] perf tools: Introduce perf_thread for backtrace
Date: Tue, 24 Nov 2015 16:24:50 +0900	[thread overview]
Message-ID: <20151124072450.GC2636@sejong> (raw)
In-Reply-To: <20151120121044.GJ29361@kernel.org>

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

  reply	other threads:[~2015-11-24  7:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20  6:03 [RFC/PATCH] perf tools: Introduce perf_thread for backtrace Namhyung Kim
2015-11-20  9:05 ` 平松雅巳 / HIRAMATU,MASAMI
2015-11-20 12:10   ` Arnaldo Carvalho de Melo
2015-11-24  7:24     ` Namhyung Kim [this message]
2015-11-20  9:29 ` Jiri Olsa
2015-11-24  7:36   ` Namhyung Kim
2015-11-23 21:39 ` Arnaldo Carvalho de Melo
2015-11-24  7:34   ` Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151124072450.GC2636@sejong \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox