[RFC][PATCH 0/4 v4] ftrace/kprobes: Setting up ftrace for kprobes

From: Steven Rostedt
Date: Wed Jul 11 2012 - 15:57:42 EST


I'm only posting patches that changed from v3. Those changes include:

Saving the flags after MCOUNT_RESTORE_FRAME (suggested by Masami)
I decided to restore flags from the pt_regs, such that a kprobe
could change the flags register.

I added the offset fix for function parent pointer (pointed out by
Alexander van Heukelum).

I fixed the i386 version of "save regs" to restore flags correctly
(as pointed out by Masami Hiramatsu).

I also added two new patches.

1) I removed the double check to function_trace_stop variable that
the function graph tracer was doing (it tested it in the function
tracer trampoline, and again in the function graph trampoline).

2) I added internal recursion protection, that I found kprobes was
triggering. This was long overdue anyway.

Masami,

Could you give your reviewed by tags for the first two patches, at least.

Thanks,

-- Steve

Steven Rostedt (4):
ftrace/x86: Add separate function to save regs
ftrace/x86: Add save_regs for i386 function calls
ftrace/x86: Remove function_trace_stop check from graph caller
ftrace/x86_64: Add recursion protection inside mcount caller

----
arch/x86/include/asm/ftrace.h | 47 +++++++++-------
arch/x86/kernel/entry_32.S | 93 ++++++++++++++++++++++++++++--
arch/x86/kernel/entry_64.S | 125 ++++++++++++++++++++++++++++++++++++-----
arch/x86/kernel/ftrace.c | 80 ++++++++++++++++++++++++--
include/linux/ftrace.h | 109 ++++++++++++++++++++++++++++++++---
kernel/trace/ftrace.c | 91 +++++++++++++++++++++++++++---
6 files changed, 485 insertions(+), 60 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/