aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ring_buffer.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-02-05 19:54:51 -0500
committerSteven Rostedt <srostedt@redhat.com>2009-02-07 20:01:18 -0500
commitd8b891a2db13c8ed296158d6f8c4e335896d0cef (patch)
treefe6ce37bd30bf892d7f663f6eac73d8ebf12728f /include/linux/ring_buffer.h
parent78d904b46a72fcf15ea6a39672bbef92953876b5 (diff)
ring-buffer: allow tracing_off to be used in core kernel code
tracing_off() is the fastest way to stop recording to the ring buffers. This may be used in places like panic and die, just before the ftrace_dump is called. This patch adds the appropriate CPP conditionals to make it a stub function when the ring buffer is not configured it. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'include/linux/ring_buffer.h')
-rw-r--r--include/linux/ring_buffer.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h
index b3b359660082..ac94c066f6e9 100644
--- a/include/linux/ring_buffer.h
+++ b/include/linux/ring_buffer.h
@@ -124,9 +124,18 @@ unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu);
124u64 ring_buffer_time_stamp(int cpu); 124u64 ring_buffer_time_stamp(int cpu);
125void ring_buffer_normalize_time_stamp(int cpu, u64 *ts); 125void ring_buffer_normalize_time_stamp(int cpu, u64 *ts);
126 126
127/*
128 * The below functions are fine to use outside the tracing facility.
129 */
130#ifdef CONFIG_RING_BUFFER
127void tracing_on(void); 131void tracing_on(void);
128void tracing_off(void); 132void tracing_off(void);
129void tracing_off_permanent(void); 133void tracing_off_permanent(void);
134#else
135static inline void tracing_on(void) { }
136static inline void tracing_off(void) { }
137static inline void tracing_off_permanent(void) { }
138#endif
130 139
131void *ring_buffer_alloc_read_page(struct ring_buffer *buffer); 140void *ring_buffer_alloc_read_page(struct ring_buffer *buffer);
132void ring_buffer_free_read_page(struct ring_buffer *buffer, void *data); 141void ring_buffer_free_read_page(struct ring_buffer *buffer, void *data);