Re: [PATCH] tracing: remove superfluous sub instructions

From: Steven Rostedt
Date: Tue Jan 18 2011 - 11:22:48 EST


On Tue, 2011-01-18 at 16:52 +0100, Frederic Weisbecker wrote:
> On Tue, Jan 18, 2011 at 04:28:18PM +0100, Jiri Olsa wrote:
> > hi,
> >
> > I think there's no need for substracting MCOUNT_INSN_SIZE from the
> > IP parameter before calling the function trace (/graph) handler.
> >
> > Maybe I overlooked something, but all the IP usage I saw ended
> > up in the kallsyms_lookup function, which does the lookup using the
> > functions' start/end boundaries to find the correct symbol for pointer.
> >
> > Thus it seems to me there's no point in substracting the
> > MCOUNT_INSN_SIZE value from the IP parameter.
> >
> > I tested for x86_64 and got proper results, I believe it's
> > the same case for x86_32.
> >
> > wbr,
> > jirka
> >
> >
> > Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
>
> Well, that sounds right after all. If we are only interested in the
> symbol, the instruction that follows "call mcount" is still relevant
> as it must belong to the same function.
>
> Steve?

NAK, it will break function triggers/probes. The "func:traceon" and
"func:traceoff". They compare the ip to the call location of mcount.

-- Steve


--
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/