diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-02-15 01:17:02 +0100 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-02-17 04:50:01 +0100 |
commit | 988ae9d6b2bc3ebdc1a488490250a6812f85e9d4 (patch) | |
tree | 2674e810891133bc7ddb935baa6c15a0412e2a8f /kernel/trace/ring_buffer.c | |
parent | ftrace: trace different functions with a different tracer (diff) | |
download | linux-988ae9d6b2bc3ebdc1a488490250a6812f85e9d4.tar.xz linux-988ae9d6b2bc3ebdc1a488490250a6812f85e9d4.zip |
ring-buffer: add tracing_is_on to test if ring buffer is enabled
This patch adds the tracing_is_on() interface to tell if the ring
buffer is turned on or not.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | kernel/trace/ring_buffer.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 2b4626ce95d6..8f19f1aa42b0 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -98,6 +98,15 @@ void tracing_off_permanent(void) set_bit(RB_BUFFERS_DISABLED_BIT, &ring_buffer_flags); } +/** + * tracing_is_on - show state of ring buffers enabled + */ +int tracing_is_on(void) +{ + return ring_buffer_flags == RB_BUFFERS_ON; +} +EXPORT_SYMBOL_GPL(tracing_is_on); + #include "trace.h" /* Up this if you want to test the TIME_EXTENTS and normalization */ |