Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1281969

Re: [PATCH v3] perf tools: Introduce perf_thread for backtrace

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3] perf tools: Introduce perf_thread for backtrace
Date 2015-12-02 17:30 +0100
Message-ID <qBis2-19N-5@gated-at.bofh.it> (permalink)
References <qBaNQ-4B0-17@gated-at.bofh.it> <qBhFE-By-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Dec 03, 2015 at 12:33:40AM +0900, Namhyung Kim wrote:
> 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):
> 
> Before:
>   perf: Segmentation fault
>   -------- backtrace --------
>   perf[0x544a8b]
>   /usr/lib/libc.so.6(+0x33680)[0x7fc46420b680]
>   perf[0x54041b]
>   perf(perf_evlist__tui_browse_hists+0x91)[0x5432e1]
>   perf(cmd_report+0x1d20)[0x43cb10]
>   perf[0x487073]
>   perf(main+0x62f)[0x42cb1f]
>   /usr/lib/libc.so.6(__libc_start_main+0xf0)[0x7fc4641f8610]
>   perf(_start+0x29)[0x42cc39]
> 
> After:
>   perf: Segmentation fault
>   -------- backtrace --------
>   perf_evsel__hists_browse(+0x43b) in perf [0x54066b]
>   perf_evlist__tui_browse_hists(+0x91) in perf [0x543531]
>   cmd_report(+0x1d20) in perf [0x43cb50]
>   run_builtin(+0x53) in perf [0x4870b3]
>   main(+0x634) in perf [0x42cb54]
>   __libc_start_main(+0xf0) in libc-2.22.so [0x7fea3577c610]
>   _start(+0x29) in perf [0x42cc79]
> 
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> v3) check return value of create_perf_thread()

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] perf tools: Introduce perf_thread for backtrace Namhyung Kim <namhyung@kernel.org> - 2015-12-02 06:50 +0100
  Re: [PATCH v2] perf tools: Introduce perf_thread for backtrace Jiri Olsa <jolsa@redhat.com> - 2015-12-02 09:20 +0100
    [PATCH v3] perf tools: Introduce perf_thread for backtrace Namhyung Kim <namhyung@kernel.org> - 2015-12-02 16:40 +0100
      Re: [PATCH v3] perf tools: Introduce perf_thread for backtrace Jiri Olsa <jolsa@redhat.com> - 2015-12-02 17:30 +0100
      RE: [PATCH v3] perf tools: Introduce perf_thread for backtrace 平松雅巳 / HIRAMATU,MASAMI   <masami.hiramatsu.pt@hitachi.com> - 2015-12-03 01:20 +0100
        Re: [PATCH v3] perf tools: Introduce perf_thread for backtrace Namhyung Kim <namhyung@kernel.org> - 2015-12-03 02:30 +0100
          RE: [PATCH v3] perf tools: Introduce perf_thread for backtrace 平松雅巳 / HIRAMATU,MASAMI   <masami.hiramatsu.pt@hitachi.com> - 2015-12-03 08:20 +0100
            Re: [PATCH v3] perf tools: Introduce perf_thread for backtrace Namhyung Kim <namhyung@kernel.org> - 2015-12-04 14:20 +0100
              RE: [PATCH v3] perf tools: Introduce perf_thread for backtrace 平松雅巳 / HIRAMATU,MASAMI   <masami.hiramatsu.pt@hitachi.com> - 2015-12-06 04:40 +0100

csiph-web