diff options
author | Steven Rostedt <srostedt@redhat.com> | 2012-04-25 14:39:54 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-05-16 19:58:49 -0400 |
commit | f0cf973a224a3e3c1dec3395af3ba01cf14b1ff4 (patch) | |
tree | c8efdfadbf904ce9eaff942156bc3d0608375d7d /include/linux/ftrace.h | |
parent | a650e02a528ab9d6d6f0b8b57745c32f2a138459 (diff) |
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>
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r-- | include/linux/ftrace.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index d32cc5e4b0cc..609948eb2b0a 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -295,7 +295,7 @@ struct dyn_ftrace *ftrace_rec_iter_record(struct ftrace_rec_iter *iter); int ftrace_update_record(struct dyn_ftrace *rec, int enable); int ftrace_test_record(struct dyn_ftrace *rec, int enable); void ftrace_run_stop_machine(int command); -int ftrace_location(unsigned long ip); +unsigned long ftrace_location(unsigned long ip); extern ftrace_func_t ftrace_trace_function; |