tracing: Have mkdir and rmdir be part of tracefs
[pandora-kernel.git] / kernel / trace / trace.c
index 2e76797..3c8913b 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/notifier.h>
 #include <linux/irqflags.h>
 #include <linux/debugfs.h>
+#include <linux/tracefs.h>
 #include <linux/pagemap.h>
 #include <linux/hardirq.h>
 #include <linux/linkage.h>
@@ -31,6 +32,7 @@
 #include <linux/splice.h>
 #include <linux/kdebug.h>
 #include <linux/string.h>
+#include <linux/mount.h>
 #include <linux/rwsem.h>
 #include <linux/slab.h>
 #include <linux/ctype.h>
@@ -2036,7 +2038,8 @@ void trace_printk_init_buffers(void)
 
        /* trace_printk() is for debug use only. Don't use it in production. */
 
-       pr_warning("\n**********************************************************\n");
+       pr_warning("\n");
+       pr_warning("**********************************************************\n");
        pr_warning("**   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE   **\n");
        pr_warning("**                                                      **\n");
        pr_warning("** trace_printk() being used. Allocating extra memory.  **\n");
@@ -4104,9 +4107,24 @@ static void tracing_set_nop(struct trace_array *tr)
        tr->current_trace = &nop_trace;
 }
 
-static int tracing_set_tracer(struct trace_array *tr, const char *buf)
+static void update_tracer_options(struct trace_array *tr, struct tracer *t)
 {
        static struct trace_option_dentry *topts;
+
+       /* Only enable if the directory has been created already. */
+       if (!tr->dir)
+               return;
+
+       /* Currently, only the top instance has options */
+       if (!(tr->flags & TRACE_ARRAY_FL_GLOBAL))
+               return;
+
+       destroy_trace_option_files(topts);
+       topts = create_trace_option_files(tr, t);
+}
+
+static int tracing_set_tracer(struct trace_array *tr, const char *buf)
+{
        struct tracer *t;
 #ifdef CONFIG_TRACER_MAX_TRACE
        bool had_max_tr;
@@ -4140,6 +4158,12 @@ static int tracing_set_tracer(struct trace_array *tr, const char *buf)
                goto out;
        }
 
+       /* If trace pipe files are being read, we can't change the tracer */
+       if (tr->current_trace->ref) {
+               ret = -EBUSY;
+               goto out;
+       }
+
        trace_branch_disable();
 
        tr->current_trace->enabled--;
@@ -4165,11 +4189,7 @@ static int tracing_set_tracer(struct trace_array *tr, const char *buf)
                free_snapshot(tr);
        }
 #endif
-       /* Currently, only the top instance has options */
-       if (tr->flags & TRACE_ARRAY_FL_GLOBAL) {
-               destroy_trace_option_files(topts);
-               topts = create_trace_option_files(tr, t);
-       }
+       update_tracer_options(tr, t);
 
 #ifdef CONFIG_TRACER_MAX_TRACE
        if (t->use_max_tr && !had_max_tr) {
@@ -4326,17 +4346,7 @@ static int tracing_open_pipe(struct inode *inode, struct file *filp)
        }
 
        trace_seq_init(&iter->seq);
-
-       /*
-        * We make a copy of the current tracer to avoid concurrent
-        * changes on it while we are reading.
-        */
-       iter->trace = kmalloc(sizeof(*iter->trace), GFP_KERNEL);
-       if (!iter->trace) {
-               ret = -ENOMEM;
-               goto fail;
-       }
-       *iter->trace = *tr->current_trace;
+       iter->trace = tr->current_trace;
 
        if (!alloc_cpumask_var(&iter->started, GFP_KERNEL)) {
                ret = -ENOMEM;
@@ -4363,6 +4373,8 @@ static int tracing_open_pipe(struct inode *inode, struct file *filp)
                iter->trace->pipe_open(iter);
 
        nonseekable_open(inode, filp);
+
+       tr->current_trace->ref++;
 out:
        mutex_unlock(&trace_types_lock);
        return ret;
@@ -4382,6 +4394,8 @@ static int tracing_release_pipe(struct inode *inode, struct file *file)
 
        mutex_lock(&trace_types_lock);
 
+       tr->current_trace->ref--;
+
        if (iter->trace->pipe_close)
                iter->trace->pipe_close(iter);
 
@@ -4389,7 +4403,6 @@ static int tracing_release_pipe(struct inode *inode, struct file *file)
 
        free_cpumask_var(iter->started);
        mutex_destroy(&iter->mutex);
-       kfree(iter->trace);
        kfree(iter);
 
        trace_array_put(tr);
@@ -4422,7 +4435,7 @@ tracing_poll_pipe(struct file *filp, poll_table *poll_table)
        return trace_poll(iter, filp, poll_table);
 }
 
-/* Must be called with trace_types_lock mutex held. */
+/* Must be called with iter->mutex held. */
 static int tracing_wait_pipe(struct file *filp)
 {
        struct trace_iterator *iter = filp->private_data;
@@ -4467,7 +4480,6 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
                  size_t cnt, loff_t *ppos)
 {
        struct trace_iterator *iter = filp->private_data;
-       struct trace_array *tr = iter->tr;
        ssize_t sret;
 
        /* return any leftover data */
@@ -4477,12 +4489,6 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
 
        trace_seq_init(&iter->seq);
 
-       /* copy the tracer to avoid using a global lock all around */
-       mutex_lock(&trace_types_lock);
-       if (unlikely(iter->trace->name != tr->current_trace->name))
-               *iter->trace = *tr->current_trace;
-       mutex_unlock(&trace_types_lock);
-
        /*
         * Avoid more than one consumer on a single file descriptor
         * This is just a matter of traces coherency, the ring buffer itself
@@ -4642,7 +4648,6 @@ static ssize_t tracing_splice_read_pipe(struct file *filp,
                .ops            = &tracing_pipe_buf_ops,
                .spd_release    = tracing_spd_release_pipe,
        };
-       struct trace_array *tr = iter->tr;
        ssize_t ret;
        size_t rem;
        unsigned int i;
@@ -4650,12 +4655,6 @@ static ssize_t tracing_splice_read_pipe(struct file *filp,
        if (splice_grow_spd(pipe, &spd))
                return -ENOMEM;
 
-       /* copy the tracer to avoid using a global lock all around */
-       mutex_lock(&trace_types_lock);
-       if (unlikely(iter->trace->name != tr->current_trace->name))
-               *iter->trace = *tr->current_trace;
-       mutex_unlock(&trace_types_lock);
-
        mutex_lock(&iter->mutex);
 
        if (iter->trace->splice_read) {
@@ -5331,6 +5330,8 @@ static int tracing_buffers_open(struct inode *inode, struct file *filp)
 
        filp->private_data = info;
 
+       tr->current_trace->ref++;
+
        mutex_unlock(&trace_types_lock);
 
        ret = nonseekable_open(inode, filp);
@@ -5361,21 +5362,16 @@ tracing_buffers_read(struct file *filp, char __user *ubuf,
        if (!count)
                return 0;
 
-       mutex_lock(&trace_types_lock);
-
 #ifdef CONFIG_TRACER_MAX_TRACE
-       if (iter->snapshot && iter->tr->current_trace->use_max_tr) {
-               size = -EBUSY;
-               goto out_unlock;
-       }
+       if (iter->snapshot && iter->tr->current_trace->use_max_tr)
+               return -EBUSY;
 #endif
 
        if (!info->spare)
                info->spare = ring_buffer_alloc_read_page(iter->trace_buffer->buffer,
                                                          iter->cpu_file);
-       size = -ENOMEM;
        if (!info->spare)
-               goto out_unlock;
+               return -ENOMEM;
 
        /* Do we have previous read data to read? */
        if (info->read < PAGE_SIZE)
@@ -5391,21 +5387,16 @@ tracing_buffers_read(struct file *filp, char __user *ubuf,
 
        if (ret < 0) {
                if (trace_empty(iter)) {
-                       if ((filp->f_flags & O_NONBLOCK)) {
-                               size = -EAGAIN;
-                               goto out_unlock;
-                       }
-                       mutex_unlock(&trace_types_lock);
+                       if ((filp->f_flags & O_NONBLOCK))
+                               return -EAGAIN;
+
                        ret = wait_on_pipe(iter, false);
-                       mutex_lock(&trace_types_lock);
-                       if (ret) {
-                               size = ret;
-                               goto out_unlock;
-                       }
+                       if (ret)
+                               return ret;
+
                        goto again;
                }
-               size = 0;
-               goto out_unlock;
+               return 0;
        }
 
        info->read = 0;
@@ -5415,18 +5406,14 @@ tracing_buffers_read(struct file *filp, char __user *ubuf,
                size = count;
 
        ret = copy_to_user(ubuf, info->spare + info->read, size);
-       if (ret == size) {
-               size = -EFAULT;
-               goto out_unlock;
-       }
+       if (ret == size)
+               return -EFAULT;
+
        size -= ret;
 
        *ppos += size;
        info->read += size;
 
- out_unlock:
-       mutex_unlock(&trace_types_lock);
-
        return size;
 }
 
@@ -5437,6 +5424,8 @@ static int tracing_buffers_release(struct inode *inode, struct file *file)
 
        mutex_lock(&trace_types_lock);
 
+       iter->tr->current_trace->ref--;
+
        __trace_array_put(iter->tr);
 
        if (info->spare)
@@ -5522,30 +5511,20 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
        int entries, size, i;
        ssize_t ret = 0;
 
-       mutex_lock(&trace_types_lock);
-
 #ifdef CONFIG_TRACER_MAX_TRACE
-       if (iter->snapshot && iter->tr->current_trace->use_max_tr) {
-               ret = -EBUSY;
-               goto out;
-       }
+       if (iter->snapshot && iter->tr->current_trace->use_max_tr)
+               return -EBUSY;
 #endif
 
-       if (splice_grow_spd(pipe, &spd)) {
-               ret = -ENOMEM;
-               goto out;
-       }
+       if (splice_grow_spd(pipe, &spd))
+               return -ENOMEM;
 
-       if (*ppos & (PAGE_SIZE - 1)) {
-               ret = -EINVAL;
-               goto out;
-       }
+       if (*ppos & (PAGE_SIZE - 1))
+               return -EINVAL;
 
        if (len & (PAGE_SIZE - 1)) {
-               if (len < PAGE_SIZE) {
-                       ret = -EINVAL;
-                       goto out;
-               }
+               if (len < PAGE_SIZE)
+                       return -EINVAL;
                len &= PAGE_MASK;
        }
 
@@ -5606,25 +5585,20 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
        /* did we read anything? */
        if (!spd.nr_pages) {
                if (ret)
-                       goto out;
+                       return ret;
+
+               if ((file->f_flags & O_NONBLOCK) || (flags & SPLICE_F_NONBLOCK))
+                       return -EAGAIN;
 
-               if ((file->f_flags & O_NONBLOCK) || (flags & SPLICE_F_NONBLOCK)) {
-                       ret = -EAGAIN;
-                       goto out;
-               }
-               mutex_unlock(&trace_types_lock);
                ret = wait_on_pipe(iter, true);
-               mutex_lock(&trace_types_lock);
                if (ret)
-                       goto out;
+                       return ret;
 
                goto again;
        }
 
        ret = splice_to_pipe(pipe, &spd);
        splice_shrink_spd(&spd);
-out:
-       mutex_unlock(&trace_types_lock);
 
        return ret;
 }
@@ -5854,28 +5828,19 @@ static __init int register_snapshot_cmd(void)
 static inline __init int register_snapshot_cmd(void) { return 0; }
 #endif /* defined(CONFIG_TRACER_SNAPSHOT) && defined(CONFIG_DYNAMIC_FTRACE) */
 
-struct dentry *tracing_init_dentry_tr(struct trace_array *tr)
+static struct dentry *tracing_get_dentry(struct trace_array *tr)
 {
-       if (tr->dir)
-               return tr->dir;
-
-       if (!debugfs_initialized())
-               return NULL;
+       if (WARN_ON(!tr->dir))
+               return ERR_PTR(-ENODEV);
 
+       /* Top directory uses NULL as the parent */
        if (tr->flags & TRACE_ARRAY_FL_GLOBAL)
-               tr->dir = debugfs_create_dir("tracing", NULL);
-
-       if (!tr->dir)
-               pr_warn_once("Could not create debugfs directory 'tracing'\n");
+               return NULL;
 
+       /* All sub buffers have a descriptor */
        return tr->dir;
 }
 
-struct dentry *tracing_init_dentry(void)
-{
-       return tracing_init_dentry_tr(&global_trace);
-}
-
 static struct dentry *tracing_dentry_percpu(struct trace_array *tr, int cpu)
 {
        struct dentry *d_tracer;
@@ -5883,14 +5848,14 @@ static struct dentry *tracing_dentry_percpu(struct trace_array *tr, int cpu)
        if (tr->percpu_dir)
                return tr->percpu_dir;
 
-       d_tracer = tracing_init_dentry_tr(tr);
-       if (!d_tracer)
+       d_tracer = tracing_get_dentry(tr);
+       if (IS_ERR(d_tracer))
                return NULL;
 
-       tr->percpu_dir = debugfs_create_dir("per_cpu", d_tracer);
+       tr->percpu_dir = tracefs_create_dir("per_cpu", d_tracer);
 
        WARN_ONCE(!tr->percpu_dir,
-                 "Could not create debugfs directory 'per_cpu/%d'\n", cpu);
+                 "Could not create tracefs directory 'per_cpu/%d'\n", cpu);
 
        return tr->percpu_dir;
 }
@@ -5907,7 +5872,7 @@ trace_create_cpu_file(const char *name, umode_t mode, struct dentry *parent,
 }
 
 static void
-tracing_init_debugfs_percpu(struct trace_array *tr, long cpu)
+tracing_init_tracefs_percpu(struct trace_array *tr, long cpu)
 {
        struct dentry *d_percpu = tracing_dentry_percpu(tr, cpu);
        struct dentry *d_cpu;
@@ -5917,9 +5882,9 @@ tracing_init_debugfs_percpu(struct trace_array *tr, long cpu)
                return;
 
        snprintf(cpu_dir, 30, "cpu%ld", cpu);
-       d_cpu = debugfs_create_dir(cpu_dir, d_percpu);
+       d_cpu = tracefs_create_dir(cpu_dir, d_percpu);
        if (!d_cpu) {
-               pr_warning("Could not create debugfs '%s' entry\n", cpu_dir);
+               pr_warning("Could not create tracefs '%s' entry\n", cpu_dir);
                return;
        }
 
@@ -6071,9 +6036,9 @@ struct dentry *trace_create_file(const char *name,
 {
        struct dentry *ret;
 
-       ret = debugfs_create_file(name, mode, parent, data, fops);
+       ret = tracefs_create_file(name, mode, parent, data, fops);
        if (!ret)
-               pr_warning("Could not create debugfs '%s' entry\n", name);
+               pr_warning("Could not create tracefs '%s' entry\n", name);
 
        return ret;
 }
@@ -6086,13 +6051,13 @@ static struct dentry *trace_options_init_dentry(struct trace_array *tr)
        if (tr->options)
                return tr->options;
 
-       d_tracer = tracing_init_dentry_tr(tr);
-       if (!d_tracer)
+       d_tracer = tracing_get_dentry(tr);
+       if (IS_ERR(d_tracer))
                return NULL;
 
-       tr->options = debugfs_create_dir("options", d_tracer);
+       tr->options = tracefs_create_dir("options", d_tracer);
        if (!tr->options) {
-               pr_warning("Could not create debugfs directory 'options'\n");
+               pr_warning("Could not create tracefs directory 'options'\n");
                return NULL;
        }
 
@@ -6161,7 +6126,7 @@ destroy_trace_option_files(struct trace_option_dentry *topts)
                return;
 
        for (cnt = 0; topts[cnt].opt; cnt++)
-               debugfs_remove(topts[cnt].entry);
+               tracefs_remove(topts[cnt].entry);
 
        kfree(topts);
 }
@@ -6250,7 +6215,7 @@ static const struct file_operations rb_simple_fops = {
 struct dentry *trace_instance_dir;
 
 static void
-init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer);
+init_tracer_tracefs(struct trace_array *tr, struct dentry *d_tracer);
 
 static int
 allocate_trace_buffer(struct trace_array *tr, struct trace_buffer *buf, int size)
@@ -6327,7 +6292,7 @@ static void free_trace_buffers(struct trace_array *tr)
 #endif
 }
 
-static int new_instance_create(const char *name)
+static int instance_mkdir(const char *name)
 {
        struct trace_array *tr;
        int ret;
@@ -6366,17 +6331,17 @@ static int new_instance_create(const char *name)
        if (allocate_trace_buffers(tr, trace_buf_size) < 0)
                goto out_free_tr;
 
-       tr->dir = debugfs_create_dir(name, trace_instance_dir);
+       tr->dir = tracefs_create_dir(name, trace_instance_dir);
        if (!tr->dir)
                goto out_free_tr;
 
        ret = event_trace_add_tracer(tr->dir, tr);
        if (ret) {
-               debugfs_remove_recursive(tr->dir);
+               tracefs_remove_recursive(tr->dir);
                goto out_free_tr;
        }
 
-       init_tracer_debugfs(tr, tr->dir);
+       init_tracer_tracefs(tr, tr->dir);
 
        list_add(&tr->list, &ftrace_trace_arrays);
 
@@ -6397,7 +6362,7 @@ static int new_instance_create(const char *name)
 
 }
 
-static int instance_delete(const char *name)
+static int instance_rmdir(const char *name)
 {
        struct trace_array *tr;
        int found = 0;
@@ -6416,7 +6381,7 @@ static int instance_delete(const char *name)
                goto out_unlock;
 
        ret = -EBUSY;
-       if (tr->ref)
+       if (tr->ref || (tr->current_trace && tr->current_trace->ref))
                goto out_unlock;
 
        list_del(&tr->list);
@@ -6438,82 +6403,17 @@ static int instance_delete(const char *name)
        return ret;
 }
 
-static int instance_mkdir (struct inode *inode, struct dentry *dentry, umode_t mode)
-{
-       struct dentry *parent;
-       int ret;
-
-       /* Paranoid: Make sure the parent is the "instances" directory */
-       parent = hlist_entry(inode->i_dentry.first, struct dentry, d_u.d_alias);
-       if (WARN_ON_ONCE(parent != trace_instance_dir))
-               return -ENOENT;
-
-       /*
-        * The inode mutex is locked, but debugfs_create_dir() will also
-        * take the mutex. As the instances directory can not be destroyed
-        * or changed in any other way, it is safe to unlock it, and
-        * let the dentry try. If two users try to make the same dir at
-        * the same time, then the new_instance_create() will determine the
-        * winner.
-        */
-       mutex_unlock(&inode->i_mutex);
-
-       ret = new_instance_create(dentry->d_iname);
-
-       mutex_lock(&inode->i_mutex);
-
-       return ret;
-}
-
-static int instance_rmdir(struct inode *inode, struct dentry *dentry)
-{
-       struct dentry *parent;
-       int ret;
-
-       /* Paranoid: Make sure the parent is the "instances" directory */
-       parent = hlist_entry(inode->i_dentry.first, struct dentry, d_u.d_alias);
-       if (WARN_ON_ONCE(parent != trace_instance_dir))
-               return -ENOENT;
-
-       /* The caller did a dget() on dentry */
-       mutex_unlock(&dentry->d_inode->i_mutex);
-
-       /*
-        * The inode mutex is locked, but debugfs_create_dir() will also
-        * take the mutex. As the instances directory can not be destroyed
-        * or changed in any other way, it is safe to unlock it, and
-        * let the dentry try. If two users try to make the same dir at
-        * the same time, then the instance_delete() will determine the
-        * winner.
-        */
-       mutex_unlock(&inode->i_mutex);
-
-       ret = instance_delete(dentry->d_iname);
-
-       mutex_lock_nested(&inode->i_mutex, I_MUTEX_PARENT);
-       mutex_lock(&dentry->d_inode->i_mutex);
-
-       return ret;
-}
-
-static const struct inode_operations instance_dir_inode_operations = {
-       .lookup         = simple_lookup,
-       .mkdir          = instance_mkdir,
-       .rmdir          = instance_rmdir,
-};
-
 static __init void create_trace_instances(struct dentry *d_tracer)
 {
-       trace_instance_dir = debugfs_create_dir("instances", d_tracer);
+       trace_instance_dir = tracefs_create_instance_dir("instances", d_tracer,
+                                                        instance_mkdir,
+                                                        instance_rmdir);
        if (WARN_ON(!trace_instance_dir))
                return;
-
-       /* Hijack the dir inode operations, to allow mkdir */
-       trace_instance_dir->d_inode->i_op = &instance_dir_inode_operations;
 }
 
 static void
-init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer)
+init_tracer_tracefs(struct trace_array *tr, struct dentry *d_tracer)
 {
        int cpu;
 
@@ -6567,21 +6467,77 @@ init_tracer_debugfs(struct trace_array *tr, struct dentry *d_tracer)
 #endif
 
        for_each_tracing_cpu(cpu)
-               tracing_init_debugfs_percpu(tr, cpu);
+               tracing_init_tracefs_percpu(tr, cpu);
+
+}
+
+static struct vfsmount *trace_automount(void *ingore)
+{
+       struct vfsmount *mnt;
+       struct file_system_type *type;
+
+       /*
+        * To maintain backward compatibility for tools that mount
+        * debugfs to get to the tracing facility, tracefs is automatically
+        * mounted to the debugfs/tracing directory.
+        */
+       type = get_fs_type("tracefs");
+       if (!type)
+               return NULL;
+       mnt = vfs_kern_mount(type, 0, "tracefs", NULL);
+       put_filesystem(type);
+       if (IS_ERR(mnt))
+               return NULL;
+       mntget(mnt);
+
+       return mnt;
+}
 
+/**
+ * tracing_init_dentry - initialize top level trace array
+ *
+ * This is called when creating files or directories in the tracing
+ * directory. It is called via fs_initcall() by any of the boot up code
+ * and expects to return the dentry of the top level tracing directory.
+ */
+struct dentry *tracing_init_dentry(void)
+{
+       struct trace_array *tr = &global_trace;
+
+       /* The top level trace array uses  NULL as parent */
+       if (tr->dir)
+               return NULL;
+
+       if (WARN_ON(!debugfs_initialized()))
+               return ERR_PTR(-ENODEV);
+
+       /*
+        * As there may still be users that expect the tracing
+        * files to exist in debugfs/tracing, we must automount
+        * the tracefs file system there, so older tools still
+        * work with the newer kerenl.
+        */
+       tr->dir = debugfs_create_automount("tracing", NULL,
+                                          trace_automount, NULL);
+       if (!tr->dir) {
+               pr_warn_once("Could not create debugfs directory 'tracing'\n");
+               return ERR_PTR(-ENOMEM);
+       }
+
+       return NULL;
 }
 
-static __init int tracer_init_debugfs(void)
+static __init int tracer_init_tracefs(void)
 {
        struct dentry *d_tracer;
 
        trace_access_lock_init();
 
        d_tracer = tracing_init_dentry();
-       if (!d_tracer)
+       if (IS_ERR(d_tracer))
                return 0;
 
-       init_tracer_debugfs(&global_trace, d_tracer);
+       init_tracer_tracefs(&global_trace, d_tracer);
 
        trace_create_file("tracing_thresh", 0644, d_tracer,
                        &global_trace, &tracing_thresh_fops);
@@ -6604,6 +6560,10 @@ static __init int tracer_init_debugfs(void)
 
        create_trace_options_dir(&global_trace);
 
+       /* If the tracer was started via cmdline, create options for it here */
+       if (global_trace.current_trace != &nop_trace)
+               update_tracer_options(&global_trace, global_trace.current_trace);
+
        return 0;
 }
 
@@ -6811,7 +6771,6 @@ __init static int tracer_alloc_buffers(void)
        int ring_buf_size;
        int ret = -ENOMEM;
 
-
        if (!alloc_cpumask_var(&tracing_buffer_mask, GFP_KERNEL))
                goto out;
 
@@ -6918,7 +6877,6 @@ void __init trace_init(void)
                        tracepoint_printk = 0;
        }
        tracer_alloc_buffers();
-       init_ftrace_syscalls();
        trace_event_init();     
 }
 
@@ -6941,5 +6899,5 @@ __init static int clear_boot_tracer(void)
        return 0;
 }
 
-fs_initcall(tracer_init_debugfs);
+fs_initcall(tracer_init_tracefs);
 late_initcall(clear_boot_tracer);