aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_functions.c
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 /kernel/trace/trace_functions.c
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 'kernel/trace/trace_functions.c')
-rw-r--r--kernel/trace/trace_functions.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c
index fceb7a9aa06d..5675ebd541f0 100644
--- a/kernel/trace/trace_functions.c
+++ b/kernel/trace/trace_functions.c
@@ -49,7 +49,7 @@ static void function_trace_start(struct trace_array *tr)
49 49
50static void 50static void
51function_trace_call_preempt_only(unsigned long ip, unsigned long parent_ip, 51function_trace_call_preempt_only(unsigned long ip, unsigned long parent_ip,
52 struct ftrace_ops *op) 52 struct ftrace_ops *op, struct pt_regs *pt_regs)
53{ 53{
54 struct trace_array *tr = func_trace; 54 struct trace_array *tr = func_trace;
55 struct trace_array_cpu *data; 55 struct trace_array_cpu *data;
@@ -77,7 +77,8 @@ function_trace_call_preempt_only(unsigned long ip, unsigned long parent_ip,
77 77
78static void 78static void
79function_trace_call(unsigned long ip, unsigned long parent_ip, 79function_trace_call(unsigned long ip, unsigned long parent_ip,
80 struct ftrace_ops *op) 80 struct ftrace_ops *op, struct pt_regs *pt_regs)
81
81{ 82{
82 struct trace_array *tr = func_trace; 83 struct trace_array *tr = func_trace;
83 struct trace_array_cpu *data; 84 struct trace_array_cpu *data;
@@ -109,7 +110,7 @@ function_trace_call(unsigned long ip, unsigned long parent_ip,
109 110
110static void 111static void
111function_stack_trace_call(unsigned long ip, unsigned long parent_ip, 112function_stack_trace_call(unsigned long ip, unsigned long parent_ip,
112 struct ftrace_ops *op) 113 struct ftrace_ops *op, struct pt_regs *pt_regs)
113{ 114{
114 struct trace_array *tr = func_trace; 115 struct trace_array *tr = func_trace;
115 struct trace_array_cpu *data; 116 struct trace_array_cpu *data;