diff options
author | Geyslan G. Bem <geyslan@gmail.com> | 2013-10-18 20:15:54 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-11-06 11:06:00 -0500 |
commit | 2e86421debc2cf4d1513c9b73fcd34c5ce431ae3 (patch) | |
tree | d72c2718037c2dc1ea9ddc26b8c9eb98c30efb66 /kernel/trace/trace.c | |
parent | b2f974d6af9accfec11e69cc76d2ab9f0c7359e0 (diff) |
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.com
Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index eaacd3aab896..2a595cf14f1c 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -2987,6 +2987,11 @@ int tracing_open_generic(struct inode *inode, struct file *filp) | |||
2987 | return 0; | 2987 | return 0; |
2988 | } | 2988 | } |
2989 | 2989 | ||
2990 | bool tracing_is_disabled(void) | ||
2991 | { | ||
2992 | return (tracing_disabled) ? true: false; | ||
2993 | } | ||
2994 | |||
2990 | /* | 2995 | /* |
2991 | * Open and update trace_array ref count. | 2996 | * Open and update trace_array ref count. |
2992 | * Must have the current trace_array passed to it. | 2997 | * Must have the current trace_array passed to it. |