]> err.no Git - linux-2.6/blobdiff - kernel/trace/trace_selftest.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
[linux-2.6] / kernel / trace / trace_selftest.c
index 3877dd9102f10bc27fdb340742e7359e13d9da0a..0911b7e073bf197b021ba77c75f6777a03910aa7 100644 (file)
@@ -28,6 +28,7 @@ trace_test_buffer_cpu(struct trace_array *tr, struct trace_array_cpu *data)
        page = list_entry(data->trace_pages.next, struct page, lru);
        entries = page_address(page);
 
+       check_pages(data);
        if (head_page(data) != entries)
                goto failed;
 
@@ -537,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 */