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

2016-09-17 Thread Josh Poimboeuf
On Sat, Sep 17, 2016 at 10:15:45AM +0200, Rabin Vincent wrote: > On Fri, Sep 16, 2016 at 04:26:56PM -0500, Josh Poimboeuf wrote: > > + addr2line -ie $objfile $hexaddr > > Could you pass in -f and -p too to addr2line? > > Before: > > $ scripts/faddr2line ~/dev/kvm2/vmlinux

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

2016-09-17 Thread Josh Poimboeuf
On Sat, Sep 17, 2016 at 10:15:45AM +0200, Rabin Vincent wrote: > On Fri, Sep 16, 2016 at 04:26:56PM -0500, Josh Poimboeuf wrote: > > + addr2line -ie $objfile $hexaddr > > Could you pass in -f and -p too to addr2line? > > Before: > > $ scripts/faddr2line ~/dev/kvm2/vmlinux

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

2016-09-17 Thread Josh Poimboeuf
On Fri, Sep 16, 2016 at 06:59:22PM -0700, Linus Torvalds wrote: > On Fri, Sep 16, 2016 at 5:42 PM, Josh Poimboeuf wrote: > > On Fri, Sep 16, 2016 at 05:09:15PM -0700, Linus Torvalds wrote: > >> On Fri, Sep 16, 2016 at 2:26 PM, Josh Poimboeuf > >> wrote:

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

2016-09-17 Thread Josh Poimboeuf
On Fri, Sep 16, 2016 at 06:59:22PM -0700, Linus Torvalds wrote: > On Fri, Sep 16, 2016 at 5:42 PM, Josh Poimboeuf wrote: > > On Fri, Sep 16, 2016 at 05:09:15PM -0700, Linus Torvalds wrote: > >> On Fri, Sep 16, 2016 at 2:26 PM, Josh Poimboeuf > >> wrote: > >> > > >> > Ok, how about this. If

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

2016-09-17 Thread Rabin Vincent
On Fri, Sep 16, 2016 at 04:26:56PM -0500, Josh Poimboeuf wrote: > + addr2line -ie $objfile $hexaddr Could you pass in -f and -p too to addr2line? Before: $ scripts/faddr2line ~/dev/kvm2/vmlinux free_reserved_area+0x90 /home/rabin/dev/linux/include/linux/compiler.h:222

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

2016-09-17 Thread Rabin Vincent
On Fri, Sep 16, 2016 at 04:26:56PM -0500, Josh Poimboeuf wrote: > + addr2line -ie $objfile $hexaddr Could you pass in -f and -p too to addr2line? Before: $ scripts/faddr2line ~/dev/kvm2/vmlinux free_reserved_area+0x90 /home/rabin/dev/linux/include/linux/compiler.h:222

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

2016-09-16 Thread Linus Torvalds
On Fri, Sep 16, 2016 at 6:59 PM, Linus Torvalds wrote: > > And finally, I suspect (5) is not reasonably fixable. Oh well. It > would require some kind of "figure out the largest common prefix of > all the filenames in the whole object file". So I'm *not* talking >

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

2016-09-16 Thread Linus Torvalds
On Fri, Sep 16, 2016 at 6:59 PM, Linus Torvalds wrote: > > And finally, I suspect (5) is not reasonably fixable. Oh well. It > would require some kind of "figure out the largest common prefix of > all the filenames in the whole object file". So I'm *not* talking > about just passing "--basenames"

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

2016-09-16 Thread Linus Torvalds
On Fri, Sep 16, 2016 at 5:42 PM, Josh Poimboeuf wrote: > On Fri, Sep 16, 2016 at 05:09:15PM -0700, Linus Torvalds wrote: >> On Fri, Sep 16, 2016 at 2:26 PM, Josh Poimboeuf wrote: >> > >> > Ok, how about this. If this looks ok, would you be willing to

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

2016-09-16 Thread Linus Torvalds
On Fri, Sep 16, 2016 at 5:42 PM, Josh Poimboeuf wrote: > On Fri, Sep 16, 2016 at 05:09:15PM -0700, Linus Torvalds wrote: >> On Fri, Sep 16, 2016 at 2:26 PM, Josh Poimboeuf wrote: >> > >> > Ok, how about this. If this looks ok, would you be willing to apply it? >> >> Looks good to me. Did you

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

2016-09-16 Thread Peter Zijlstra
On Fri, Sep 16, 2016 at 04:26:56PM -0500, Josh Poimboeuf wrote: > Ok, how about this. If this looks ok, would you be willing to apply it? Looks good, and yes without --inline addr2line would be tons less useful ;-) Thanks for cooking this up.

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

2016-09-16 Thread Peter Zijlstra
On Fri, Sep 16, 2016 at 04:26:56PM -0500, Josh Poimboeuf wrote: > Ok, how about this. If this looks ok, would you be willing to apply it? Looks good, and yes without --inline addr2line would be tons less useful ;-) Thanks for cooking this up.

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

2016-09-16 Thread Josh Poimboeuf
On Fri, Sep 16, 2016 at 05:09:15PM -0700, Linus Torvalds wrote: > On Fri, Sep 16, 2016 at 2:26 PM, Josh Poimboeuf wrote: > > > > Ok, how about this. If this looks ok, would you be willing to apply it? > > Looks good to me. Did you test the size verification with some

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

2016-09-16 Thread Josh Poimboeuf
On Fri, Sep 16, 2016 at 05:09:15PM -0700, Linus Torvalds wrote: > On Fri, Sep 16, 2016 at 2:26 PM, Josh Poimboeuf wrote: > > > > Ok, how about this. If this looks ok, would you be willing to apply it? > > Looks good to me. Did you test the size verification with some made-up cases? Yep. And I

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

2016-09-16 Thread Linus Torvalds
On Fri, Sep 16, 2016 at 2:26 PM, Josh Poimboeuf wrote: > > Ok, how about this. If this looks ok, would you be willing to apply it? Looks good to me. Did you test the size verification with some made-up cases? Linus

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

2016-09-16 Thread Linus Torvalds
On Fri, Sep 16, 2016 at 2:26 PM, Josh Poimboeuf wrote: > > Ok, how about this. If this looks ok, would you be willing to apply it? Looks good to me. Did you test the size verification with some made-up cases? Linus

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

2016-09-16 Thread Josh Poimboeuf
willing to apply it? --- From: Josh Poimboeuf <jpoim...@redhat.com> Subject: [PATCH v2] scripts: add script for translating stack dump function offsets addr2line doesn't work with KASLR addresses. Add a basic addr2line wrapper script which takes the 'func+offset/size' format as input. Sig

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

2016-09-16 Thread Josh Poimboeuf
d the call trace often makes it obvious which particular function it > is for the human that is reading the output, but since it should be > easy to cut down on the potential duplicates, I think it's a good > thing to do. Ok, how about this. If this looks ok, would you be willing to apply it? --- F