aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-01-10 14:34:13 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-14 06:11:37 -0500
commit002bb86d8d42f18937aef396c3ecd65c7e02e21a (patch)
treece8e81f6dc2515f6442198bbd4b527d900982f8e /kernel/trace/trace.h
parenta14a07b8018b714e03a39ff2180c66e307ef4238 (diff)
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>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index b3f9ad1b4d84..79c872100dd5 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -334,24 +334,6 @@ struct tracer_flags {
334/* Makes more easy to define a tracer opt */ 334/* Makes more easy to define a tracer opt */
335#define TRACER_OPT(s, b) .name = #s, .bit = b 335#define TRACER_OPT(s, b) .name = #s, .bit = b
336 336
337/*
338 * If you want to provide a stat file (one-shot statistics), fill
339 * an iterator with stat_start/stat_next and a stat_show callbacks.
340 * The others callbacks are optional.
341 */
342struct tracer_stat {
343 /* The name of your stat file */
344 const char *name;
345 /* Iteration over statistic entries */
346 void *(*stat_start)(void);
347 void *(*stat_next)(void *prev, int idx);
348 /* Compare two entries for sorting (optional) for stats */
349 int (*stat_cmp)(void *p1, void *p2);
350 /* Print a stat entry */
351 int (*stat_show)(struct seq_file *s, void *p);
352 /* Print the headers of your stat entries */
353 int (*stat_headers)(struct seq_file *s);
354};
355 337
356/* 338/*
357 * A specific tracer, represented by methods that operate on a trace array: 339 * A specific tracer, represented by methods that operate on a trace array:
@@ -466,8 +448,6 @@ void tracing_start_sched_switch_record(void);
466int register_tracer(struct tracer *type); 448int register_tracer(struct tracer *type);
467void unregister_tracer(struct tracer *type); 449void unregister_tracer(struct tracer *type);
468 450
469void init_tracer_stat(struct tracer *trace);
470
471extern unsigned long nsecs_to_usecs(unsigned long nsecs); 451extern unsigned long nsecs_to_usecs(unsigned long nsecs);
472 452
473extern unsigned long tracing_max_latency; 453extern unsigned long tracing_max_latency;