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


Groups > linux.kernel > #1485590

Re: [PATCH] scripts: add script for translating stack dump function offsets

From Josh Poimboeuf <jpoimboe@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] scripts: add script for translating stack dump function offsets
Date 2016-09-17 21:00 +0200
Message-ID <sit0d-67s-3@gated-at.bofh.it> (permalink)
References (3 earlier) <shDO2-6VP-31@gated-at.bofh.it> <si2CK-608-23@gated-at.bofh.it> <si5TY-8lX-21@gated-at.bofh.it> <si6Q2-uW-25@gated-at.bofh.it> <sijWW-GT-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Sep 17, 2016 at 11:11:44AM +0200, Vegard Nossum wrote:
> On 16 September 2016 at 21:17, Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> > On Fri, Sep 16, 2016 at 11:12:10AM -0700, Linus Torvalds wrote:
> >> Side note: I find addr2line almost completely useless in many cases
> >> not because of address space randomization, but because of how complex
> >> the inlining often is. I just had something where I decided to use
> >> addr2line and it just pointed me to the __read_once_size_nocheck()
> >> line in <linux/compiler.h>. That was not very useful.
> >>
> >> I ended up actually looking at the instructions *around* it, to find
> >> where that one instruction had been inlined from.
> >>
> >> So I'm wondering if this kind of helper script could be extended to
> >> have that "look around it" thing to help.
> >
> > I think that issue is solved by addr2line's '--inline' option, which the
> > script uses:
> 
> Another small gotcha is that stack trace addresses are _return
> addresses_, not callsites. So you'll sometimes want to pass 'addr - 1'
> instead of just addr, as the next address (the return address) may
> belong to a completely unrelated deeply inlined function.

Hm, good point.  In that case, should it *always* subtract 1?  (Except
when the offset is already 0, of course.)

-- 
Josh

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


Thread

perf: perf_fuzzer lockup in perf_cgroup_attach Vince Weaver <vincent.weaver@maine.edu> - 2016-09-15 04:50 +0200
  Re: perf: perf_fuzzer lockup in perf_cgroup_attach Stephane Eranian <eranian@google.com> - 2016-09-15 07:40 +0200
    Re: perf: perf_fuzzer lockup in perf_cgroup_attach Peter Zijlstra <peterz@infradead.org> - 2016-09-15 09:30 +0200
      Re: perf: perf_fuzzer lockup in perf_cgroup_attach Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-15 14:20 +0200
        [PATCH] scripts: add script for translating stack dump function  offsets Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-16 16:50 +0200
          Re: [PATCH] scripts: add script for translating stack dump function offsets Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-16 20:20 +0200
            Re: [PATCH] scripts: add script for translating stack dump function  offsets Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-16 21:20 +0200
              Re: [PATCH] scripts: add script for translating stack dump function offsets Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-16 21:30 +0200
                [PATCH v2] scripts: add script for translating stack dump function  offsets Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-16 23:30 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-17 02:10 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-17 02:50 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-17 04:00 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-17 04:40 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-17 20:50 +0200
                [PATCH v3] scripts: add script for translating stack dump function Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-19 18:00 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump function Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-19 21:00 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump function Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-19 21:20 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump  function Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-19 21:30 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump  function Rabin Vincent <rabin@rab.in> - 2016-09-19 22:10 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump function Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-19 22:30 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump  function Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-19 23:00 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump  function Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-19 23:10 +0200
                Re: [PATCH v3] scripts: add script for translating stack dump function Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-19 23:10 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Peter Zijlstra <peterz@infradead.org> - 2016-09-17 03:30 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Rabin Vincent <rabin@rab.in> - 2016-09-17 10:20 +0200
                Re: [PATCH v2] scripts: add script for translating stack dump  function offsets Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-17 20:50 +0200
              Re: [PATCH] scripts: add script for translating stack dump function offsets Vegard Nossum <vegard.nossum@gmail.com> - 2016-09-17 11:20 +0200
                Re: [PATCH] scripts: add script for translating stack dump function  offsets Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-17 21:00 +0200
    Re: perf: perf_fuzzer lockup in perf_cgroup_attach Vince Weaver <vincent.weaver@maine.edu> - 2016-09-15 14:50 +0200
  Re: perf: perf_fuzzer lockup in perf_cgroup_attach Peter Zijlstra <peterz@infradead.org> - 2016-09-15 09:20 +0200
    Re: perf: perf_fuzzer lockup in perf_cgroup_attach Vince Weaver <vincent.weaver@maine.edu> - 2016-09-15 14:50 +0200

csiph-web