aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_functions.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-08-08 16:57:47 -0400
committerSteven Rostedt <rostedt@goodmis.org>2012-07-19 13:17:35 -0400
commit2f5f6ad9390c1ebbf738d130dbfe80b60eaa167e (patch)
tree1a88c37725d3efbcde8fa0a3cf19490d793877f0 /kernel/trace/trace_functions.c
parent6e0f17be0361444862637e8986c8c1a3b3f8dcf8 (diff)
ftrace: Pass ftrace_ops as third parameter to function trace callback
Currently the function trace callback receives only the ip and parent_ip of the function that it traced. It would be more powerful to also return the ops that registered the function as well. This allows the same function to act differently depending on what ftrace_ops registered it. Link: http://lkml.kernel.org/r/20120612225424.267254552@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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c
index c7b0c6a7db09..fceb7a9aa06d 100644
--- a/kernel/trace/trace_functions.c
+++ b/kernel/trace/trace_functions.c
@@ -48,7 +48,8 @@ static void function_trace_start(struct trace_array *tr)
48} 48}
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{ 53{
53 struct trace_array *tr = func_trace; 54 struct trace_array *tr = func_trace;
54 struct trace_array_cpu *data; 55 struct trace_array_cpu *data;
@@ -75,7 +76,8 @@ function_trace_call_preempt_only(unsigned long ip, unsigned long parent_ip)
75} 76}
76 77
77static void 78static void
78function_trace_call(unsigned long ip, unsigned long parent_ip) 79function_trace_call(unsigned long ip, unsigned long parent_ip,
80 struct ftrace_ops *op)
79{ 81{
80 struct trace_array *tr = func_trace; 82 struct trace_array *tr = func_trace;
81 struct trace_array_cpu *data; 83 struct trace_array_cpu *data;
@@ -106,7 +108,8 @@ function_trace_call(unsigned long ip, unsigned long parent_ip)
106} 108}
107 109
108static void 110static void
109function_stack_trace_call(unsigned long ip, unsigned long parent_ip) 111function_stack_trace_call(unsigned long ip, unsigned long parent_ip,
112 struct ftrace_ops *op)
110{ 113{
111 struct trace_array *tr = func_trace; 114 struct trace_array *tr = func_trace;
112 struct trace_array_cpu *data; 115 struct trace_array_cpu *data;