Messages in this thread | | | Date | Fri, 21 Nov 2008 10:09:29 -0800 | From | Jim Radford <> | Subject | Re: [PATCH] ftrace: mcount record based dynamic tracing for ARM |
| |
On Fri, Nov 21, 2008 at 03:38:27PM +0000, Russell King - ARM Linux wrote: > On Fri, Nov 21, 2008 at 09:27:17AM -0500, Steven Rostedt wrote: > > On Thu, 20 Nov 2008, Jim Radford wrote: > > > - select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) > > > + select HAVE_FTRACE_MCOUNT_RECORD > > > + select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL)
> > Russell mentioned something about the code not being compatible > > with Thumb2, is the above if statement enough?
> We've started on merging some of the pre-requisits, and it will mean > that the instruction length is no longer constant. (It may be a > 16bit or 32bit instruction.)
The only instruction that matters for arm is "bl <func>" since that's what's emitted by gcc to call mcount(). I suspect thumb will be easy to support. <func> isn't known when the file is compiled, so I assume in that case the assembler will have to leave at least 4 bytes (even in thumb) in case mcount() gets linked far away.
I haven't looked at the return tracing code yet. That might be harder to support, but given x86 works, I suspect it'll be doable.
-Jim
| |