public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6][RFC] tracing/kprobes: Get ready for -mfentry
@ 2012-04-26  2:29 Steven Rostedt
  2012-04-26  2:29 ` [PATCH 1/6][RFC] ftrace: Sort all function addresses, not just per page Steven Rostedt
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Steven Rostedt @ 2012-04-26  2:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Masami Hiramatsu, Frederic Weisbecker

[-- 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 --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-04-27 15:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-26  2:29 [PATCH 0/6][RFC] tracing/kprobes: Get ready for -mfentry Steven Rostedt
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox