Keith Owens wrote:
>
> On Mon, 11 Dec 2000 09:33:34 -0800,
> "John Hawkes" <hawkes@xxxxxxxxxxxx> wrote:
> >Is there a reason why the xfs version of arch/i386/kernel/semaphore.c
> >has added:
> > #if defined(CONFIG_FRAME_POINTER)
> > ...
> > #endif
> >for the asm routines __down_failed, __down_failed_interruptible, and
> >__down_failed_trylock, but *not* for __up_wakeup, __down_read_failed,
> >and __down_write_failed?
>
> That is from the kdb patch, not from XFS. Unfortunately the use of
> CONFIG_FRAME_POINTER was added before I took over kdb so I am guessing
> here. Early versions of kdb required frame pointers to do backtrace.
> __down_failedxxx routines can wait so they often appear in back traces.
> __up_wakeup never waits so it was probably ignored for back trace
> purposes. __down_read_failed and __down_write_failed can wait, I have
> no idea why they do not have frame pointers.
Yes, it is for backtracing purposes. I'd guess the two omitted
routines were likely due to an oversight ... I know some of them
were added because I had pointed out missing frames; guess there
weren't any complaints about the omitted routines.
If you don't need FRAME_POINTER, why not remove it entirely?
BTW, John, the profiling tool also uses similar tricks to
record the callers of the down routines ... and _those_ you
might have to keep.
>
> Current kdb does not need frame pointers to get a back trace on ix86 so
> the lack of CONFIG_FRAME_POINTER on __up_wakeup, __down_read_failed and
> __down_write_failed has not been a problem. For consistency, I will
> add frame pointers to these routines in my next but one kdb patch.
|