From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: [PATCH 0/6][RFC] tracing/kprobes: Get ready for -mfentry
Date: Wed, 25 Apr 2012 22:29:22 -0400 [thread overview]
Message-ID: <20120426022922.683707508@goodmis.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1750 bytes --]
As I want to add the -mfentry to allow for function tracing without
frame pointers (as some distros are now disabling function tracing :-(
I have to handle the case that a kprobe is placed on a ftrace nop.
As ftrace nops with -mfentry will be the first instruction of a
function, it being the location of a kprobe is a likely occurrence.
Ideally, kprobes would just use the function tracing infrastructure
to make an automatic optimized jump. But that is for another day as it
requires a bit of work in the function tracer to handle regs and such.
So the quick fix for now is to simply move the probe to the next
instruction after the ftrace nop. As the nop shouldn't be doing anything
anyway (and tracing should return to the function in the same state)
moving the location of the probe should not cause any harm.
The first 5 patches are non controversial, and could probably just be
pushed for 3.5 inclusion. The last patch makes the change to move the
probe to the next instruction after the ftrace nop.
Anyone see any problem with this?
-- Steve
Steven Rostedt (6):
ftrace: Sort all function addresses, not just per page
ftrace: Remove extra helper functions
ftrace: Speed up search by skipping pages by address
ftrace: Consolidate ftrace_location() and ftrace_text_reserved()
ftrace: Return record ip addr for ftrace_location()
kprobes: Allow probe on ftrace reserved text (but move it)
----
include/asm-generic/vmlinux.lds.h | 2 +-
include/linux/ftrace.h | 2 +-
kernel/kprobes.c | 11 ++-
kernel/trace/ftrace.c | 173 ++++++++++++++++++++-----------------
4 files changed, 104 insertions(+), 84 deletions(-)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2012-04-26 2:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 2:29 Steven Rostedt [this message]
2012-04-26 2:29 ` [PATCH 1/6][RFC] ftrace: Sort all function addresses, not just per page Steven Rostedt
2012-04-26 2:29 ` [PATCH 2/6][RFC] ftrace: Remove extra helper functions Steven Rostedt
2012-04-26 2:29 ` [PATCH 3/6][RFC] ftrace: Speed up search by skipping pages by address Steven Rostedt
2012-04-26 2:29 ` [PATCH 4/6][RFC] ftrace: Consolidate ftrace_location() and ftrace_text_reserved() Steven Rostedt
2012-04-26 2:29 ` [PATCH 5/6][RFC] ftrace: Return record ip addr for ftrace_location() Steven Rostedt
2012-04-26 2:29 ` [PATCH 6/6][RFC] kprobes: Allow probe on ftrace reserved text (but move it) Steven Rostedt
2012-04-26 10:12 ` Masami Hiramatsu
2012-04-27 14:01 ` Steven Rostedt
2012-04-27 15:29 ` Frank Ch. Eigler
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=20120426022922.683707508@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@elte.hu \
/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
Powered by JetHome