tracing: make testing syscall events a separate configuration
authorSteven Rostedt <srostedt@redhat.com>
Mon, 14 Sep 2009 15:58:24 +0000 (11:58 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Mon, 14 Sep 2009 15:58:24 +0000 (11:58 -0400)
Parag noticed that the number of event tests has increased tremendously:

grep "Testing event" dmesg.31rc9 |wc -l
100

grep "Testing event" dmesg.31git |wc -l
1172

This is due to the testing of every syscall event when ftrace self
test is enabled. This adds a bit more time to kernel boot up and can
affect development by slowing down the time it takes between reboots.

This option makes the testing of the syscall events into a separate
config, to still be able to test most of ftrace internals at boot up
but not have to wait for all the syscall events to be tested.

The syscall event testing only tests the enabling and disabling of
the trace point, since the syscalls are not executed. What really needs
to be done is to somehow have a userspace tool test the syscall tracepoints
as well.

Reported-by: Parag Warudkar <parag.lkml@gmail.com>
LKML-Reference: <f7848160909130815l3e768a30n3b28808bbe5c254b@mail.gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/Kconfig
kernel/trace/trace_events.c

index 1ea0d1234f4a36cb2b0fcb6769ddef83def4d35e..aa002cef924c3c688a1e4c4e3a08ac6a94fa8aa5 100644 (file)
@@ -469,6 +469,18 @@ config FTRACE_STARTUP_TEST
          functioning properly. It will do tests on all the configured
          tracers of ftrace.
 
+config EVENT_TRACE_TEST_SYSCALLS
+       bool "Run selftest on syscall events"
+       depends on FTRACE_STARTUP_TEST
+       help
+        This option will also enable testing every syscall event.
+        It only enables the event and disables it and runs various loads
+        with the event enabled. This adds a bit more time for kernel boot
+        up since it runs this on every system call defined.
+
+        TBD - enable a way to actually call the syscalls as we test their
+              events
+
 config MMIOTRACE
        bool "Memory mapped IO tracing"
        depends on HAVE_MMIOTRACE_SUPPORT && PCI
index 0fa8f9faa61cbd4408bd45ebdc17cfec3bace2b2..787f0fb0994e861a3248a5018f7c4667b200910b 100644 (file)
@@ -1326,6 +1326,18 @@ static __init void event_trace_self_tests(void)
                if (!call->regfunc)
                        continue;
 
+/*
+ * Testing syscall events here is pretty useless, but
+ * we still do it if configured. But this is time consuming.
+ * What we really need is a user thread to perform the
+ * syscalls as we test.
+ */
+#ifndef CONFIG_EVENT_TRACE_TEST_SYSCALLS
+               if (call->system &&
+                   strcmp(call->system, "syscalls") == 0)
+                       continue;
+#endif
+
                pr_info("Testing event %s: ", call->name);
 
                /*
This page took 0.029234 seconds and 5 git commands to generate.