From: john cooper <john.cooper@third-harmonic.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Tim Bird <tim.bird@am.sony.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux kernel <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@redhat.com>,
john cooper <john.cooper@third-harmonic.com>
Subject: Re: MIPS RT debug support
Date: Thu, 15 Nov 2007 20:55:49 -0500 [thread overview]
Message-ID: <473CF8A5.9030101@third-harmonic.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0711151956430.30058@gandalf.stny.rr.com>
Steven Rostedt wrote:
> On Thu, 15 Nov 2007, Tim Bird wrote:
>
>> john cooper wrote:
>>> The more daunting problem stems from limitations in the MIPS
>>> ABI which makes the latency trace support problematic.
>>> Rather than rehash the issue:
>>>
>>> http://lists.linuxcoding.com/kernel/2005-q4/msg10163.html
>>>
>>> Until we have a usable instrumentation solution in place,
>>> characterization, debug, and support of PREEMPT_RT for MIPS
>>> is going to be a challenge.
>> Agreed. I have been using KFT (Kernel Function Trace)
>> on MIPS, and it has decent support for function traceback
>> reporting, but it's not currently integrated with latency-trace
>> at all. We should discuss if this could possibly be
>> used to debug RT-preempt. It is much heavier weight than
>> the mcount stuff, but uses similar (but not identical)
>> gcc profiling instrumentation. I'm not sure if the
>> two can be turned on together, or how hard it would
>> be to move latency-trace onto -finstrument_functions.
>
> I'm not familiar with the KFT but I'm sure it would be easy to port
> latency_trace to it. Really, all the mcount does is make a wrapper to pass
> to the trace calls.
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
next prev parent reply other threads:[~2007-11-16 1:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-15 0:15 rt-preempt: problem compiling rt-preempt 2.6.23.1-rt11 on MIPS Tim Bird
2007-11-15 0:56 ` Thomas Gleixner
2007-11-15 1:06 ` Steven Rostedt
2007-11-15 1:20 ` Tim Bird
2007-11-15 1:27 ` Steven Rostedt
2007-11-15 2:24 ` john cooper
2007-11-15 23:31 ` MIPS RT debug support Tim Bird
2007-11-16 1:00 ` Steven Rostedt
2007-11-16 1:55 ` john cooper [this message]
2007-11-16 2:25 ` Steven Rostedt
2007-11-16 11:56 ` john cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=473CF8A5.9030101@third-harmonic.com \
--to=john.cooper@third-harmonic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=tim.bird@am.sony.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.