Commit 2e86421d authored by Geyslan G. Bem's avatar Geyslan G. Bem Committed by Steven Rostedt

tracing: Add helper function tracing_is_disabled()

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.comSigned-off-by: default avatarGeyslan G. Bem <geyslan@gmail.com>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent b2f974d6
...@@ -2987,6 +2987,11 @@ int tracing_open_generic(struct inode *inode, struct file *filp) ...@@ -2987,6 +2987,11 @@ int tracing_open_generic(struct inode *inode, struct file *filp)
return 0; return 0;
} }
bool tracing_is_disabled(void)
{
return (tracing_disabled) ? true: false;
}
/* /*
* Open and update trace_array ref count. * Open and update trace_array ref count.
* Must have the current trace_array passed to it. * Must have the current trace_array passed to it.
......
...@@ -514,6 +514,7 @@ void tracing_reset_online_cpus(struct trace_buffer *buf); ...@@ -514,6 +514,7 @@ void tracing_reset_online_cpus(struct trace_buffer *buf);
void tracing_reset_current(int cpu); void tracing_reset_current(int cpu);
void tracing_reset_all_online_cpus(void); void tracing_reset_all_online_cpus(void);
int tracing_open_generic(struct inode *inode, struct file *filp); int tracing_open_generic(struct inode *inode, struct file *filp);
bool tracing_is_disabled(void);
struct dentry *trace_create_file(const char *name, struct dentry *trace_create_file(const char *name,
umode_t mode, umode_t mode,
struct dentry *parent, struct dentry *parent,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment