Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140752
b: refs/heads/master
c: 988ae9d
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt committed Feb 17, 2009
1 parent 07d53ec commit cf0b75b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 59df055f1991c9fc0c71a9230663c39188f6972f
refs/heads/master: 988ae9d6b2bc3ebdc1a488490250a6812f85e9d4
2 changes: 2 additions & 0 deletions trunk/include/linux/ring_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,12 @@ void ring_buffer_normalize_time_stamp(int cpu, u64 *ts);
void tracing_on(void);
void tracing_off(void);
void tracing_off_permanent(void);
int tracing_is_on(void);
#else
static inline void tracing_on(void) { }
static inline void tracing_off(void) { }
static inline void tracing_off_permanent(void) { }
static inline int tracing_is_on(void) { return 0; }
#endif

void *ring_buffer_alloc_read_page(struct ring_buffer *buffer);
Expand Down
9 changes: 9 additions & 0 deletions trunk/kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit cf0b75b

Please sign in to comment.