From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH 1/5] [PATCH 1/5] function-graph/x86: replace unbalanced ret with jmp
Date: Tue, 13 Oct 2009 18:32:37 -0400 [thread overview]
Message-ID: <20091013223237.GB14430@Krystal> (raw)
In-Reply-To: <1255469210.7113.2436.camel@gandalf.stny.rr.com>
* Steven Rostedt (rostedt@goodmis.org) wrote:
> On Tue, 2009-10-13 at 17:21 -0400, Mathieu Desnoyers wrote:
>
> > > What it was:
> > >
> > > call function
> > > function:
> > > call mcount
> > > mcount:
> > > call ftrace_entry
> >
> > Can we manage to change this call
>
> Note, that call jumps to C code.
>
> >
> > > ftrace_entry:
> > > mess up with return code of caller
> > > ret
> >
> > .. and this ret for 2 jmp instructions too ?
>
> The code is all in C, and it too calls functions. Not sure where this
> helps out any. The ret here matches their calls. Thus the prediction
> will work.
>
Oh, OK. I thought the callback was in assembly. That's a bit more work
than I thought.
> >
> > Given that we have no choice but to kill call/ret prediction logic, I
> > think it might be good to try to use this logic as little as possible
> > (by favoring jmp jmp over call/ret when the return target is invariant).
> >
> > That's just an idea, benchmarks could prove me right/wrong.
>
> I don't see how this would help. And I'm not about to waste time
> experimenting. What's the rational?
>
The idea is that call/ret are fast when predictions are right. In this
case, I wonder if the fact that we trash the call/ret prediction (even
if this happens after the paired call/ret) would have an impact on
balanced call/ret in the tracing code path. I doubt so, but who knows.
Probably not worth spending much time on this. It would just have been
nice to try if the implementation would have been trivial.
Thanks,
Mathieu
> -- Steve
>
>
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
next prev parent reply other threads:[~2009-10-13 22:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-13 20:33 [PATCH 0/5] [GIT PULL][2.6.33] tracing: various updates Steven Rostedt
2009-10-13 20:33 ` [PATCH 1/5] [PATCH 1/5] function-graph/x86: replace unbalanced ret with jmp Steven Rostedt
2009-10-13 20:47 ` Mathieu Desnoyers
2009-10-13 21:10 ` Steven Rostedt
2009-10-13 21:21 ` Mathieu Desnoyers
2009-10-13 21:26 ` Steven Rostedt
2009-10-13 22:32 ` Mathieu Desnoyers [this message]
2009-10-13 21:02 ` Frederic Weisbecker
2009-10-13 21:12 ` Steven Rostedt
2009-10-13 22:26 ` Frederic Weisbecker
2009-10-14 6:58 ` [tip:tracing/core] function-graph/x86: Replace " tip-bot for Steven Rostedt
2009-10-13 20:33 ` [PATCH 2/5] [PATCH 2/5] tracing: export symbols for kernel lock tracepoints Steven Rostedt
2009-10-13 20:43 ` Frederic Weisbecker
2009-10-13 21:14 ` Steven Rostedt
2009-10-13 20:33 ` [PATCH 3/5] [PATCH 3/5] tracing: support multiple pids in set_pid_ftrace file Steven Rostedt
2009-10-14 6:58 ` [tip:tracing/core] tracing: Support " tip-bot for jolsa@redhat.com
2009-10-13 20:33 ` [PATCH 4/5] [PATCH 4/5] tracing: enable records during the module load Steven Rostedt
2009-10-14 6:59 ` [tip:tracing/core] tracing: Enable " tip-bot for Jiri Olsa
2009-10-13 20:33 ` [PATCH 5/5] [PATCH 5/5] tracing: enabling "__cold" functions Steven Rostedt
2009-10-14 6:59 ` [tip:tracing/core] tracing: Enable " tip-bot for Jiri Olsa
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=20091013223237.GB14430@Krystal \
--to=mathieu.desnoyers@polymtl.ca \
--cc=akpm@linux-foundation.org \
--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.