All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: remove superfluous sub instructions
Date: Tue, 18 Jan 2011 17:41:48 +0100	[thread overview]
Message-ID: <20110118164148.GD1941@jolsa.brq.redhat.com> (raw)
In-Reply-To: <1295367762.12215.2.camel@gandalf.stny.rr.com>

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

  reply	other threads:[~2011-01-18 16:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-18 15:28 [PATCH] tracing: remove superfluous sub instructions Jiri Olsa
2011-01-18 15:52 ` Frederic Weisbecker
2011-01-18 16:22   ` Steven Rostedt
2011-01-18 16:41     ` Jiri Olsa [this message]
2011-01-18 17:01       ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110118164148.GD1941@jolsa.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.