diff options
author | Steven Rostedt <srostedt@redhat.com> | 2008-12-02 23:50:05 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-03 02:56:26 -0500 |
commit | e49dc19c6a19ea112fcb94b7c62ec62cdd5c08aa (patch) | |
tree | 851dcdfe321e16a327d656ecd7040ef6e8590bec /kernel/trace/trace.c | |
parent | 7ee991fbc6f947e9b04f29c9c6c1d057d0671a16 (diff) |
ftrace: function graph return for function entry
Impact: feature, let entry function decide to trace or not
This patch lets the graph tracer entry function decide if the tracing
should be done at the end as well. This requires all function graph
entry functions return 1 if it should trace, or 0 if the return should
not be traced.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 380de630ebce..8b6409a62b54 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -1200,7 +1200,7 @@ function_trace_call(unsigned long ip, unsigned long parent_ip) | |||
1200 | } | 1200 | } |
1201 | 1201 | ||
1202 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 1202 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
1203 | void trace_graph_entry(struct ftrace_graph_ent *trace) | 1203 | int trace_graph_entry(struct ftrace_graph_ent *trace) |
1204 | { | 1204 | { |
1205 | struct trace_array *tr = &global_trace; | 1205 | struct trace_array *tr = &global_trace; |
1206 | struct trace_array_cpu *data; | 1206 | struct trace_array_cpu *data; |
@@ -1219,6 +1219,8 @@ void trace_graph_entry(struct ftrace_graph_ent *trace) | |||
1219 | } | 1219 | } |
1220 | atomic_dec(&data->disabled); | 1220 | atomic_dec(&data->disabled); |
1221 | local_irq_restore(flags); | 1221 | local_irq_restore(flags); |
1222 | |||
1223 | return 1; | ||
1222 | } | 1224 | } |
1223 | 1225 | ||
1224 | void trace_graph_return(struct ftrace_graph_ret *trace) | 1226 | void trace_graph_return(struct ftrace_graph_ret *trace) |