Re: MIPS RT debug support

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Steven Rostedt <rostedt@...>
Cc: Tim Bird <tim.bird@...>, Thomas Gleixner <tglx@...>, linux kernel <linux-kernel@...>, Ingo Molnar <mingo@...>, john cooper <john.cooper@...>
Date: Thursday, November 15, 2007 - 9:55 pm

Steven Rostedt wrote:

It isn't an issue of getting a hook into the FUNCTION_PROLOGUE
(mcount() here) but rather of emulating the CALLER_ADDR[0123]
defs which map onto the gcc internal __builtin_return_address().
Doing so using the affectionately dubbed "Three Stooges Algorithm"
called out in the MIPS ABI is both complex and nondeterministic.

The entry FUNCTION_PROLOGUE hook provides a means to log the path
traveled thus far.  __builtin_return_address() gives a way to
snapshot a stub of the stack invocation. Together they provide
somewhat complimentary but useful debug information.

We could log the stack invocation progress in the latency
instrumentation itself by noting a new invocation in the
FUNCTION_PROLOGUE and unwind of the same in the currently
unused FUNCTION_EPILOGUE hook.  So we're just shadowing the
actual runtime stack in effect with a data structure which
can be traversed far more easily.

-john

-- 
john.cooper@third-harmonic.com
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
MIPS RT debug support, Tim Bird, (Thu Nov 15, 7:31 pm)
Re: MIPS RT debug support, Steven Rostedt, (Thu Nov 15, 9:00 pm)
Re: MIPS RT debug support, john cooper, (Thu Nov 15, 9:55 pm)
Re: MIPS RT debug support, Steven Rostedt, (Thu Nov 15, 10:25 pm)
Re: MIPS RT debug support, john cooper, (Fri Nov 16, 7:56 am)