]> Pileus Git - ~andy/linux/commitdiff
tracing: Add helper function tracing_is_disabled()
authorGeyslan G. Bem <geyslan@gmail.com>
Sat, 19 Oct 2013 00:15:54 +0000 (21:15 -0300)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 6 Nov 2013 16:06:00 +0000 (11:06 -0500)
This patch creates the function 'tracing_is_disabled', which
can be used outside of trace.c.

Link: http://lkml.kernel.org/r/1382141754-12155-1-git-send-email-geyslan@gmail.com
Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c
kernel/trace/trace.h

index eaacd3aab8960383da87705bff82ee3edaabeda8..2a595cf14f1c3ecbb86ee766ca5536db23bdf02e 100644 (file)
@@ -2987,6 +2987,11 @@ int tracing_open_generic(struct inode *inode, struct file *filp)
        return 0;
 }
 
+bool tracing_is_disabled(void)
+{
+       return (tracing_disabled) ? true: false;
+}
+
 /*
  * Open and update trace_array ref count.
  * Must have the current trace_array passed to it.
index 9c27cdadd71faa55edec74c7469e77c1b29b5134..4388e16484f1028ce42a9d3ea902205983c76434 100644 (file)
@@ -514,6 +514,7 @@ void tracing_reset_online_cpus(struct trace_buffer *buf);
 void tracing_reset_current(int cpu);
 void tracing_reset_all_online_cpus(void);
 int tracing_open_generic(struct inode *inode, struct file *filp);
+bool tracing_is_disabled(void);
 struct dentry *trace_create_file(const char *name,
                                 umode_t mode,
                                 struct dentry *parent,