Re: [PATCH v2 4/8] objtool: add undwarf debuginfo generation

2017-07-11 Thread Ingo Molnar
* Josh Poimboeuf wrote: > Anyway, I used some linker magic to temporarily move the unwinder code to the > end of .text, so that unwinder changes don't add unexpected side effects to > the > microbenchmark behavior. Now I'm getting more consistent results: the packed > struct is measuring ~2

Re: [PATCH v2 4/8] objtool: add undwarf debuginfo generation

2017-07-10 Thread Josh Poimboeuf
On Fri, Jul 07, 2017 at 11:44:37AM +0200, Ingo Molnar wrote: > > * Josh Poimboeuf wrote: > > > On Thu, Jun 29, 2017 at 10:06:52AM -0500, Josh Poimboeuf wrote: > > > On Thu, Jun 29, 2017 at 04:46:18PM +0200, Ingo Molnar wrote: > > > > > > > > * Josh Poimboeuf wrote: > > > > > > > > > > Plus, s

Re: [PATCH v2 4/8] objtool: add undwarf debuginfo generation

2017-07-07 Thread Ingo Molnar
* Josh Poimboeuf wrote: > On Thu, Jun 29, 2017 at 10:06:52AM -0500, Josh Poimboeuf wrote: > > On Thu, Jun 29, 2017 at 04:46:18PM +0200, Ingo Molnar wrote: > > > > > > * Josh Poimboeuf wrote: > > > > > > > > Plus, shouldn't we use __packed for 'struct undwarf' to minimize the > > > > > struct

Re: [PATCH v2 4/8] objtool: add undwarf debuginfo generation

2017-07-06 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 10:06:52AM -0500, Josh Poimboeuf wrote: > On Thu, Jun 29, 2017 at 04:46:18PM +0200, Ingo Molnar wrote: > > > > * Josh Poimboeuf wrote: > > > > > > Plus, shouldn't we use __packed for 'struct undwarf' to minimize the > > > > structure's size (to 6 bytes AFAICS?) - or is o

Re: [PATCH v2 4/8] objtool: add undwarf debuginfo generation

2017-06-29 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 04:46:18PM +0200, Ingo Molnar wrote: > > * Josh Poimboeuf wrote: > > > > Plus, shouldn't we use __packed for 'struct undwarf' to minimize the > > > structure's size (to 6 bytes AFAICS?) - or is optimal packing of the main > > > undwarf array already guaranteed on every

Re: [PATCH v2 4/8] objtool: add undwarf debuginfo generation

2017-06-29 Thread Ingo Molnar
* Josh Poimboeuf wrote: > > Plus, shouldn't we use __packed for 'struct undwarf' to minimize the > > structure's size (to 6 bytes AFAICS?) - or is optimal packing of the main > > undwarf array already guaranteed on every platform with this layout? > > Ah yes, it should definitely be packed (a

Re: [PATCH v2 4/8] objtool: add undwarf debuginfo generation

2017-06-29 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 09:25:12AM +0200, Ingo Molnar wrote: > > +/* > > + * This struct contains a simplified version of the DWARF Call Frame > > + * Information standard. It contains only the necessary parts of the real > > + * DWARF, simplified for ease of access by the in-kernel unwinder. It

Re: [PATCH v2 4/8] objtool: add undwarf debuginfo generation

2017-06-29 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 09:14:14AM +0200, Ingo Molnar wrote: > > * Josh Poimboeuf wrote: > > > Now that objtool knows the states of all registers on the stack for each > > instruction, it's straightforward to generate debuginfo for an unwinder > > to use. > > > > Instead of generating DWARF, ge

Re: [PATCH v2 4/8] objtool: add undwarf debuginfo generation

2017-06-29 Thread Ingo Molnar
* Josh Poimboeuf wrote: > +#ifndef _UNDWARF_TYPES_H > +#define _UNDWARF_TYPES_H > + > +/* > + * The UNDWARF_REG_* registers are base registers which are used to find > other > + * registers on the stack. > + * > + * The CFA (call frame address) is the value of the stack pointer on the > + * pre

Re: [PATCH v2 4/8] objtool: add undwarf debuginfo generation

2017-06-29 Thread Ingo Molnar
* Josh Poimboeuf wrote: > Now that objtool knows the states of all registers on the stack for each > instruction, it's straightforward to generate debuginfo for an unwinder > to use. > > Instead of generating DWARF, generate a new format called undwarf, which > is more suitable for an in-kernel

[PATCH v2 4/8] objtool: add undwarf debuginfo generation

2017-06-28 Thread Josh Poimboeuf
Now that objtool knows the states of all registers on the stack for each instruction, it's straightforward to generate debuginfo for an unwinder to use. Instead of generating DWARF, generate a new format called undwarf, which is more suitable for an in-kernel unwinder. See tools/objtool/Documenta