]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Return record ip addr for ftrace_location()
authorSteven Rostedt <srostedt@redhat.com>
Wed, 25 Apr 2012 18:39:54 +0000 (14:39 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 16 May 2012 23:58:49 +0000 (19:58 -0400)
commitc9d1a7a20fdc43e9f1c47cabbc0719a13ace2c53
treec8efdfadbf904ce9eaff942156bc3d0608375d7d
parent497f508be268a68db4f117e72829d7648f44d309
ftrace: Return record ip addr for ftrace_location()

ftrace_location() is passed an addr, and returns 1 if the addr is
on a ftrace nop (or caller to ftrace_caller), and 0 otherwise.

To let kprobes know if it should move a breakpoint or not, it
must return the actual addr that is the start of the ftrace nop.
This way a kprobe placed on the location of a ftrace nop, can
instead be placed on the instruction after the nop. Even if the
probe addr is on the second or later byte of the nop, it can
simply be moved forward.

Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
include/linux/ftrace.h
kernel/trace/ftrace.c