]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/trace/trace_selftest.c
Merge branch 'tracing/sysprof' into auto-ftrace-next
[linux-2.6-omap-h63xx.git] / kernel / trace / trace_selftest.c
index 18c5423bc9777390c9442a5b461b5b67ba1d71f1..0911b7e073bf197b021ba77c75f6777a03910aa7 100644 (file)
@@ -538,3 +538,26 @@ trace_selftest_startup_sched_switch(struct tracer *trace, struct trace_array *tr
        return ret;
 }
 #endif /* CONFIG_CONTEXT_SWITCH_TRACER */
+
+#ifdef CONFIG_SYSPROF_TRACER
+int
+trace_selftest_startup_sysprof(struct tracer *trace, struct trace_array *tr)
+{
+       unsigned long count;
+       int ret;
+
+       /* start the tracing */
+       tr->ctrl = 1;
+       trace->init(tr);
+       /* Sleep for a 1/10 of a second */
+       msleep(100);
+       /* stop the tracing. */
+       tr->ctrl = 0;
+       trace->ctrl_update(tr);
+       /* check the trace buffer */
+       ret = trace_test_buffer(tr, &count);
+       trace->reset(tr);
+
+       return ret;
+}
+#endif /* CONFIG_SYSPROF_TRACER */