aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2008-05-12 15:20:44 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 14:40:36 -0400
commit60a11774b38fef1ab90b18c5353bd1c7c4d311c8 (patch)
treee2a6fd066b0dba6dcd776d07383e2932055cf66a /kernel/trace/trace.h
parente1c08bdd9fa73e44096e5a82c0d5928b04ab02c8 (diff)
ftrace: add self-tests
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 83e257e38084..88edbf1f6788 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -99,6 +99,10 @@ struct tracer {
99 void (*start)(struct trace_iterator *iter); 99 void (*start)(struct trace_iterator *iter);
100 void (*stop)(struct trace_iterator *iter); 100 void (*stop)(struct trace_iterator *iter);
101 void (*ctrl_update)(struct trace_array *tr); 101 void (*ctrl_update)(struct trace_array *tr);
102#ifdef CONFIG_FTRACE_STARTUP_TEST
103 int (*selftest)(struct tracer *trace,
104 struct trace_array *tr);
105#endif
102 struct tracer *next; 106 struct tracer *next;
103 int print_max; 107 int print_max;
104}; 108};
@@ -185,4 +189,31 @@ extern int unregister_tracer_switch(struct tracer_switch_ops *ops);
185extern unsigned long ftrace_update_tot_cnt; 189extern unsigned long ftrace_update_tot_cnt;
186#endif 190#endif
187 191
192#ifdef CONFIG_FTRACE_STARTUP_TEST
193#ifdef CONFIG_FTRACE
194extern int trace_selftest_startup_function(struct tracer *trace,
195 struct trace_array *tr);
196#endif
197#ifdef CONFIG_IRQSOFF_TRACER
198extern int trace_selftest_startup_irqsoff(struct tracer *trace,
199 struct trace_array *tr);
200#endif
201#ifdef CONFIG_PREEMPT_TRACER
202extern int trace_selftest_startup_preemptoff(struct tracer *trace,
203 struct trace_array *tr);
204#endif
205#if defined(CONFIG_IRQSOFF_TRACER) && defined(CONFIG_PREEMPT_TRACER)
206extern int trace_selftest_startup_preemptirqsoff(struct tracer *trace,
207 struct trace_array *tr);
208#endif
209#ifdef CONFIG_SCHED_TRACER
210extern int trace_selftest_startup_wakeup(struct tracer *trace,
211 struct trace_array *tr);
212#endif
213#ifdef CONFIG_CONTEXT_SWITCH_TRACER
214extern int trace_selftest_startup_sched_switch(struct tracer *trace,
215 struct trace_array *tr);
216#endif
217#endif /* CONFIG_FTRACE_STARTUP_TEST */
218
188#endif /* _LINUX_KERNEL_TRACE_H */ 219#endif /* _LINUX_KERNEL_TRACE_H */