Re: [PATCH 7/7] DWARF: add the config option

From: Ingo Molnar
Date: Mon May 08 2017 - 02:15:43 EST



* Andy Lutomirski <luto@xxxxxxxxxxxxxx> wrote:

> I think that, if the code were sufficiently robust, it would be handy if the
> unwinder displayed function arguments. DWARF can do that to a limited extent.
>
> That being said, having a simpler table format would probably cover most of the
> use cases.

I'd say that if objtool generates the kernel's debuginfo, it all becomes a kernel
internal matter to a large degree: we can add function argument display support as
well and see what effect it has on data structure size and complexity - it would
certainly be a nice improvement in oops output to see function arguments.

But it should all start from a minimum complexity step (which will be complex
enough!) and the first step should be stack trace display, in a performance
optimized data structure, to allow both kernel stack dumps and various tracing and
other instrumentation facilities that make use of the kernel's dwarf-ish unwider
as-is.

The goal of this first step would be to allow x86 to drop generating the RBP frame
pointer:

- This shrinks kernel text and instruction count (by 1-2% IIRC),
- speeds up certain code paths measurably,
- plus it also allows larger functions to use one more general purpose register.

... so it's a good thing to have, if and only if the unwinder's fragility and
complexity does not kill us. And much of that fragility comes from who generates
the debuginfo ...

Thanks,

Ingo