Re: [PATCH] tracing: remove superfluous sub instructions

From: Frederic Weisbecker
Date: Tue Jan 18 2011 - 10:52:17 EST


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