lkml.org 
[lkml]   [2011]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tracing: remove superfluous sub instructions
On Tue, Jan 18, 2011 at 11:22:42AM -0500, Steven Rostedt wrote:
> 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@redhat.com>
> >
> > 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
>
>

ops, missed this one..

would it make sense to update the IP inside the function_trace_probe_call
function to save one instruction in the entry code used by all? or it's
not worth it..

jirka


\
 
 \ /
  Last update: 2011-01-18 17:45    [W:0.030 / U:3.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site