From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Frederic Weisbecker <fweisbec@gmail.com>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andi Kleen <andi@firstfloor.org>
Subject: [RFC PATCH 0/4] ftrace: Add use of -mfentry for x86_64
Date: Tue, 07 Aug 2012 15:38:45 -0400 [thread overview]
Message-ID: <20120807193845.146666357@goodmis.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1764 bytes --]
This is an RFC patch set that makes gcc use the -mfentry option with
-pg. This will set the ftrace 'hook' to the beginning of the function
and also remove the requirement that -pg enables frame pointers.
This has a couple of benefits (and probably more).
1) removal of the frame pointer requirement makes for smaller and faster code.
2) Having the function trace hook at the beginning of the function instead
of after the frame is set up, gives the function tracing callbacks access
to the parameters. This means that kprobes can take advantage of this.
When a kprobe is set on top of a ftrace hook (nop), it will automatically
use the function tracing callback. This makes it into an 'optimized' probe
as there's no need to hit a breakpoint and trigger the probe that way.
The function tracing code can do the work for it. Note, optimized probes
are only allowed with !PREEMPT, but a ftrace optimize probe is allowed
in any context (another benefit).
This only implements fentry for x86_64.
Steven Rostedt (4):
ftrace: Make recordmcount.c handle __fentry__
ftrace: Add -mfentry to Makefile on function tracer
ftrace: Do not test frame pointers if -mfentry is used
ftrace/x86: Add support for -mfentry to x86_64
----
Makefile | 6 +++++-
arch/x86/Kconfig | 1 +
arch/x86/include/asm/ftrace.h | 7 ++++++-
arch/x86/kernel/entry_64.S | 18 +++++++++++++++++-
arch/x86/kernel/x8664_ksyms_64.c | 6 +++++-
kernel/trace/Kconfig | 5 +++++
kernel/trace/trace_functions_graph.c | 5 ++++-
scripts/recordmcount.h | 4 +++-
8 files changed, 46 insertions(+), 6 deletions(-)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2012-08-07 19:41 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-07 19:38 Steven Rostedt [this message]
2012-08-07 19:38 ` [RFC PATCH 1/4] ftrace: Make recordmcount.c handle __fentry__ Steven Rostedt
2012-08-07 23:57 ` John Reiser
2012-08-08 0:05 ` Steven Rostedt
2012-08-27 17:03 ` [tip:perf/core] " tip-bot for Steven Rostedt
2012-08-07 19:38 ` [RFC PATCH 2/4] ftrace: Add -mfentry to Makefile on function tracer Steven Rostedt
2012-08-27 17:04 ` [tip:perf/core] " tip-bot for Steven Rostedt
2012-08-07 19:38 ` [RFC PATCH 3/4] ftrace: Do not test frame pointers if -mfentry is used Steven Rostedt
2012-08-08 4:34 ` Masami Hiramatsu
2012-08-08 12:49 ` Steven Rostedt
2012-08-09 2:58 ` Masami Hiramatsu
2012-08-09 3:45 ` Linus Torvalds
2012-08-09 3:57 ` Steven Rostedt
2012-08-09 4:15 ` H. Peter Anvin
2012-08-09 12:37 ` Andi Kleen
2012-08-27 17:05 ` [tip:perf/core] " tip-bot for Steven Rostedt
2012-08-07 19:38 ` [RFC PATCH 4/4] ftrace/x86: Add support for -mfentry to x86_64 Steven Rostedt
2012-08-09 8:34 ` Masami Hiramatsu
2012-08-09 13:46 ` Steven Rostedt
2012-08-09 13:48 ` Steven Rostedt
2012-08-10 7:45 ` Masami Hiramatsu
2012-08-27 17:06 ` [tip:perf/core] " tip-bot for Steven Rostedt
2012-08-07 20:23 ` [RFC PATCH 0/4] ftrace: Add use of -mfentry for x86_64 H. Peter Anvin
2012-08-13 8:42 ` Ingo Molnar
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=20120807193845.146666357@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).