aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ring_buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ring_buffer.h')
-rw-r--r--include/linux/ring_buffer.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h
index e097c2e6b6dc..d363467c8f13 100644
--- a/include/linux/ring_buffer.h
+++ b/include/linux/ring_buffer.h
@@ -28,17 +28,19 @@ struct ring_buffer_event {
28 * size = 8 bytes 28 * size = 8 bytes
29 * 29 *
30 * @RINGBUF_TYPE_TIME_STAMP: Sync time stamp with external clock 30 * @RINGBUF_TYPE_TIME_STAMP: Sync time stamp with external clock
31 * array[0] = tv_nsec 31 * array[0] = tv_nsec
32 * array[1] = tv_sec 32 * array[1..2] = tv_sec
33 * size = 16 bytes 33 * size = 16 bytes
34 * 34 *
35 * @RINGBUF_TYPE_DATA: Data record 35 * @RINGBUF_TYPE_DATA: Data record
36 * If len is zero: 36 * If len is zero:
37 * array[0] holds the actual length 37 * array[0] holds the actual length
38 * array[1..(length+3)/4-1] holds data 38 * array[1..(length+3)/4] holds data
39 * size = 4 + 4 + length (bytes)
39 * else 40 * else
40 * length = len << 2 41 * length = len << 2
41 * array[0..(length+3)/4] holds data 42 * array[0..(length+3)/4-1] holds data
43 * size = 4 + length (bytes)
42 */ 44 */
43enum ring_buffer_type { 45enum ring_buffer_type {
44 RINGBUF_TYPE_PADDING, 46 RINGBUF_TYPE_PADDING,
@@ -122,6 +124,12 @@ void ring_buffer_normalize_time_stamp(int cpu, u64 *ts);
122 124
123void tracing_on(void); 125void tracing_on(void);
124void tracing_off(void); 126void tracing_off(void);
127void tracing_off_permanent(void);
128
129void *ring_buffer_alloc_read_page(struct ring_buffer *buffer);
130void ring_buffer_free_read_page(struct ring_buffer *buffer, void *data);
131int ring_buffer_read_page(struct ring_buffer *buffer,
132 void **data_page, int cpu, int full);
125 133
126enum ring_buffer_flags { 134enum ring_buffer_flags {
127 RB_FL_OVERWRITE = 1 << 0, 135 RB_FL_OVERWRITE = 1 << 0,