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>
This commit is contained in:
Steven Rostedt 2008-12-02 23:50:05 -05:00 committed by Ingo Molnar
parent 7ee991fbc6
commit e49dc19c6a
7 changed files with 24 additions and 7 deletions

View file

@ -1200,7 +1200,7 @@ function_trace_call(unsigned long ip, unsigned long parent_ip)
}
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
void trace_graph_entry(struct ftrace_graph_ent *trace)
int trace_graph_entry(struct ftrace_graph_ent *trace)
{
struct trace_array *tr = &global_trace;
struct trace_array_cpu *data;
@ -1219,6 +1219,8 @@ void trace_graph_entry(struct ftrace_graph_ent *trace)
}
atomic_dec(&data->disabled);
local_irq_restore(flags);
return 1;
}
void trace_graph_return(struct ftrace_graph_ret *trace)