|
@@ -215,7 +215,8 @@ int trace_graph_entry(struct ftrace_graph_ent *trace)
|
|
|
if (!ftrace_trace_task(current))
|
|
|
return 0;
|
|
|
|
|
|
- if (!ftrace_graph_addr(trace->func))
|
|
|
+ /* trace it when it is-nested-in or is a function enabled. */
|
|
|
+ if (!(trace->depth || ftrace_graph_addr(trace->func)))
|
|
|
return 0;
|
|
|
|
|
|
local_irq_save(flags);
|
|
@@ -228,9 +229,6 @@ int trace_graph_entry(struct ftrace_graph_ent *trace)
|
|
|
} else {
|
|
|
ret = 0;
|
|
|
}
|
|
|
- /* Only do the atomic if it is not already set */
|
|
|
- if (!test_tsk_trace_graph(current))
|
|
|
- set_tsk_trace_graph(current);
|
|
|
|
|
|
atomic_dec(&data->disabled);
|
|
|
local_irq_restore(flags);
|
|
@@ -278,8 +276,6 @@ void trace_graph_return(struct ftrace_graph_ret *trace)
|
|
|
pc = preempt_count();
|
|
|
__trace_graph_return(tr, trace, flags, pc);
|
|
|
}
|
|
|
- if (!trace->depth)
|
|
|
- clear_tsk_trace_graph(current);
|
|
|
atomic_dec(&data->disabled);
|
|
|
local_irq_restore(flags);
|
|
|
}
|