aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ftrace.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-08-09 12:50:46 -0400
committerSteven Rostedt <rostedt@goodmis.org>2012-07-19 13:18:49 -0400
commita1e2e31d175a1349274eba3465d17616c6725f8c (patch)
tree5f92ba7a822f8a9911aa50157f796213bfac4ebb /include/linux/ftrace.h
parentccf3672d530170c98c734dfc5db07d64bcbad2ad (diff)
ftrace: Return pt_regs to function trace callback
Return as the 4th paramater to the function tracer callback the pt_regs. Later patches that implement regs passing for the architectures will require having the ftrace_ops set the SAVE_REGS flag, which will tell the arch to take the time to pass a full set of pt_regs to the ftrace_ops callback function. If the arch does not support it then it should pass NULL. If an arch can pass full regs, then it should define: ARCH_SUPPORTS_FTRACE_SAVE_REGS to 1 Link: http://lkml.kernel.org/r/20120702201821.019966811@goodmis.org Reviewed-by: 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.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 3651fdc3bec9..e4202881fb00 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -10,6 +10,7 @@
10#include <linux/kallsyms.h> 10#include <linux/kallsyms.h>
11#include <linux/linkage.h> 11#include <linux/linkage.h>
12#include <linux/bitops.h> 12#include <linux/bitops.h>
13#include <linux/ptrace.h>
13#include <linux/ktime.h> 14#include <linux/ktime.h>
14#include <linux/sched.h> 15#include <linux/sched.h>
15#include <linux/types.h> 16#include <linux/types.h>
@@ -54,7 +55,7 @@ ftrace_enable_sysctl(struct ctl_table *table, int write,
54struct ftrace_ops; 55struct ftrace_ops;
55 56
56typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip, 57typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip,
57 struct ftrace_ops *op); 58 struct ftrace_ops *op, struct pt_regs *regs);
58 59
59/* 60/*
60 * FTRACE_OPS_FL_* bits denote the state of ftrace_ops struct and are 61 * FTRACE_OPS_FL_* bits denote the state of ftrace_ops struct and are
@@ -188,7 +189,8 @@ static inline int ftrace_function_local_disabled(struct ftrace_ops *ops)
188 return *this_cpu_ptr(ops->disabled); 189 return *this_cpu_ptr(ops->disabled);
189} 190}
190 191
191extern void ftrace_stub(unsigned long a0, unsigned long a1, struct ftrace_ops *op); 192extern void ftrace_stub(unsigned long a0, unsigned long a1,
193 struct ftrace_ops *op, struct pt_regs *regs);
192 194
193#else /* !CONFIG_FUNCTION_TRACER */ 195#else /* !CONFIG_FUNCTION_TRACER */
194/* 196/*