tracing/ftrace: separate events tracing and stats tracing engine

Impact: tracing's Api change

Currently, the stat tracing depends on the events tracing.
When you switch to a new tracer, the stats files of the previous tracer
will disappear. But it's more scalable to separate those two engines.
This way, we can keep the stat files of one or several tracers when we
want, without bothering of multiple tracer stat files or tracer switching.

To build/destroys its stats files, a tracer just have to call
register_stat_tracer/unregister_stat_tracer everytimes it wants to.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Frederic Weisbecker
2009-01-10 11:34:13 -08:00
committed by Ingo Molnar
parent a14a07b801
commit 002bb86d8d
5 changed files with 173 additions and 181 deletions

View File

@ -2353,7 +2353,6 @@ static int tracing_set_tracer(char *buf)
if (ret)
goto out;
}
init_tracer_stat(t);
trace_branch_enable(tr);
out:
@ -3218,7 +3217,6 @@ __init static int tracer_alloc_buffers(void)
#else
current_trace = &nop_trace;
#endif
init_tracer_stat(current_trace);
/* All seems OK, enable tracing */
tracing_disabled = 0;