[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160712141628.qlo2lhhjiyxfs6sw@treble>
Date: Tue, 12 Jul 2016 09:16:28 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Andy Lutomirski <luto@...capital.net>
Cc: Brian Gerst <brgerst@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Denys Vlasenko <dvlasenk@...hat.com>,
Ingo Molnar <mingo@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Borislav Petkov <bp@...e.de>, "H. Peter Anvin" <hpa@...or.com>,
X86 ML <x86@...nel.org>, Dave Anderson <anderson@...hat.com>
Subject: Re: [PATCH 3/4] x86: Rewrite switch_to() code
On Mon, May 23, 2016 at 10:03:54AM -0700, Andy Lutomirski wrote:
> Do you have any understanding of why there are so many unwinder
> implementations? Your reliable unwinder seems to be yet another copy
> of more or less the same code.
>
> I'd like to see a single, high-quality unwinder implemented as a state
> machine, along the lines of:
>
> struct unwind_state state;
> unwind_start_inactive_task(&state, ...); or
> unwind_start_pt_regs(&state, regs); or whatever.
> unwind_next_frame(&state);
>
> where, after unwind_next_frame, state encodes whatever registers are
> known (at least bp and ip, but all the GPRs would be nice and are
> probably mandatory for DWARF) and an indication of whether this is a
> real frame or a guessed frame (the things that currently show up as
> '?').
FYI, I'm working on something very similar to this which replaces
dump_trace(). The frame pointer encoding patches were going to require
more changes to the unwinder than I expected, and more callback sprawl.
So it looks like it's going to be easier to just go ahead and rewrite
the unwinder first.
--
Josh
Powered by blists - more mailing lists