tracing: Make ftrace_trace_stack() depend on general trace_array flag

In preparation for the multi buffer instances to have their own trace_flags,
the check in ftrace_trace_stack() needs to test the trace_array descriptor
flag that is for the current event, not the global_trace descriptor.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
Steven Rostedt (Red Hat)
2015-09-30 11:45:22 -04:00
committed by Steven Rostedt
parent 9a38a8856f
commit 2d34f48955
2 changed files with 16 additions and 13 deletions

View File

@@ -2941,15 +2941,15 @@ static struct ftrace_ops trace_ops __initdata =
static __init void event_trace_self_test_with_function(void)
{
int ret;
event_tr = top_trace_array();
if (WARN_ON(!event_tr))
return;
ret = register_ftrace_function(&trace_ops);
if (WARN_ON(ret < 0)) {
pr_info("Failed to enable function tracer for event tests\n");
return;
}
pr_info("Running tests again, along with the function tracer\n");
event_tr = top_trace_array();
if (WARN_ON(!event_tr))
return;
event_trace_self_tests();
unregister_ftrace_function(&trace_ops);
}