Re: [PATCH 2/2] ftrace: add function-graph tracer support for ARMv2

From: Russell King - ARM Linux
Date: Wed May 20 2009 - 04:12:24 EST


On Wed, May 20, 2009 at 04:34:35AM +0200, Frederic Weisbecker wrote:
> On Fri, May 15, 2009 at 10:06:36PM +0100, Russell King - ARM Linux wrote:
> > However, I'm not sure that this code is entirely right (and I'm not
> > sure what's going on with this patch - my editor is randomly changing
> > the placement of characters in it. Are you submitting patches using
> > UTF-8 characters in the code?)
> >
> > > >> @@ -139,8 +144,16 @@ ENTRY(mcount)
> > > >>       adr r0, ftrace_stub
> > > >>       cmp r0, r2
> > > >>       bne trace
> >
> > If this is r0 != ftrace_stub, go to trace. So the next block will
> > only be executed if r0 /was/ ftrace_stub, in which case it can't be
> > ftrace_graph_return.
>
> Ah! This part concerns the function tracer.
> Let's see how it looks like in the original code: (added more comments
> inside)

You've completely missed the point I was trying to make. Please go back
and re-read my email and think about precisely what's happening in the
assembly path, particularly which branches will be taken and which code
paths will be taken with various values of r2.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/