]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/trace/trace_selftest.c
Merge tag 'fixes-for-v3.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / kernel / trace / trace_selftest.c
index 2901e3b8859066ed32a703143f0372089285109b..a7329b7902f81fff4c2bafa3d4ef29780b52fe3d 100644 (file)
@@ -640,13 +640,20 @@ out:
  * Enable ftrace, sleep 1/10 second, and then read the trace
  * buffer to see if all is in order.
  */
-int
+__init int
 trace_selftest_startup_function(struct tracer *trace, struct trace_array *tr)
 {
        int save_ftrace_enabled = ftrace_enabled;
        unsigned long count;
        int ret;
 
+#ifdef CONFIG_DYNAMIC_FTRACE
+       if (ftrace_filter_param) {
+               printk(KERN_CONT " ... kernel command line filter set: force PASS ... ");
+               return 0;
+       }
+#endif
+
        /* make sure msleep has been recorded */
        msleep(1);
 
@@ -727,13 +734,20 @@ static int trace_graph_entry_watchdog(struct ftrace_graph_ent *trace)
  * Pretty much the same than for the function tracer from which the selftest
  * has been borrowed.
  */
-int
+__init int
 trace_selftest_startup_function_graph(struct tracer *trace,
                                        struct trace_array *tr)
 {
        int ret;
        unsigned long count;
 
+#ifdef CONFIG_DYNAMIC_FTRACE
+       if (ftrace_filter_param) {
+               printk(KERN_CONT " ... kernel command line filter set: force PASS ... ");
+               return 0;
+       }
+#endif
+
        /*
         * Simulate the init() callback but we attach a watchdog callback
         * to detect and recover from possible hangs