Re: [RFC PATCH 1/2] x86: Fix rbp saving in pt_regs on irq entry

Frederic Weisbecker
2011-01-07T17:17:16Z

On Fri, Jan 07, 2011 at 05:58:43PM +0100, Ingo Molnar wrote:
>
> * Frederic Weisbecker <fweisbec@gmail.com> wrote:
>
> > On Fri, Jan 07, 2011 at 04:13:58PM +0000, Jan Beulich wrote:
> > > >>> On 07.01.11 at 17:05, Frederic Weisbecker <fweisbec@gmail.com> wrote:
> > > > Once I'll have perf callchain based on CFI ready, we'll perhaps find some
> > > > issues
> > > > there. Although I guess there are already tools that can make use of that.
> > >
> > > Is this to read that you're planning to do a re-spin of the CFI
> > > unwinding code (which I'm not allowed to submit another time,
> > > but which we've been using for years in SuSE distros) then?
> >
> > An in-kernel CFI unwinder?
> >
> > No the intended CFI unwinding that I'm working on for perf is made
> > on post-processing, on top of partial stack and regs snapshots.
> >
> > The true unwinding is computed in userspace.
>
> I think that design will be fundamentally more robust and more flexible than an
> in-kernel unwinder.

But in fact for the kernel unwinding it still uses frame pointers which is certainly
the fastest and lightest way to unwind a stack. Very nice for our profiling.

Now one may argue about the loss of a register and its associated overhead, not
sure it's always noticeable though...