]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/trace/ftrace.c
ftrace: make filtered functions effective on setting
[linux-2.6-omap-h63xx.git] / kernel / trace / ftrace.c
index 27212321eb0dfd5a6ca641be938f3874c6d04baf..5cbddb59e99f5a4fd76cc1ff453a29a84a6d1010 100644 (file)
@@ -186,7 +186,6 @@ enum {
 
 static int ftrace_filtered;
 static int tracing_on;
-static int frozen_record_count;
 
 static LIST_HEAD(ftrace_new_addrs);
 
@@ -211,6 +210,9 @@ static struct dyn_ftrace *ftrace_free_records;
 
 
 #ifdef CONFIG_KPROBES
+
+static int frozen_record_count;
+
 static inline void freeze_record(struct dyn_ftrace *rec)
 {
        if (!(rec->flags & FTRACE_FL_FROZEN)) {
@@ -736,6 +738,9 @@ t_next(struct seq_file *m, void *v, loff_t *pos)
                    ((iter->flags & FTRACE_ITER_FAILURES) &&
                     !(rec->flags & FTRACE_FL_FAILED)) ||
 
+                   ((iter->flags & FTRACE_ITER_FILTER) &&
+                    !(rec->flags & FTRACE_FL_FILTER)) ||
+
                    ((iter->flags & FTRACE_ITER_NOTRACE) &&
                     !(rec->flags & FTRACE_FL_NOTRACE))) {
                        rec = NULL;
@@ -1184,7 +1189,7 @@ ftrace_regex_release(struct inode *inode, struct file *file, int enable)
 
        mutex_lock(&ftrace_sysctl_lock);
        mutex_lock(&ftrace_start_lock);
-       if (iter->filtered && ftrace_start && ftrace_enabled)
+       if (ftrace_start && ftrace_enabled)
                ftrace_run_update_code(FTRACE_ENABLE_CALLS);
        mutex_unlock(&ftrace_start_lock);
        mutex_unlock(&ftrace_sysctl_lock);
@@ -1337,6 +1342,14 @@ void __init ftrace_init(void)
 }
 
 #else
+
+static int __init ftrace_nodyn_init(void)
+{
+       ftrace_enabled = 1;
+       return 0;
+}
+device_initcall(ftrace_nodyn_init);
+
 # define ftrace_startup()              do { } while (0)
 # define ftrace_shutdown()             do { } while (0)
 # define ftrace_startup_sysctl()       do { } while (0)
@@ -1443,3 +1456,4 @@ ftrace_enable_sysctl(struct ctl_table *table, int write,
        mutex_unlock(&ftrace_sysctl_lock);
        return ret;
 }
+