diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-04-15 16:53:47 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-17 11:03:28 -0400 |
commit | d1b182a8d49ed6416325b4e0a1cb0f17cd4e702a (patch) | |
tree | f482bfba39828503f32ed994829d2d3cd6b81bfe /include | |
parent | e6187007d6c365b551c69ea3df46f06fd1c8bd19 (diff) |
tracing/events/ring-buffer: expose format of ring buffer headers to users
Currently, every thing needed to read the binary output from the
ring buffers is available, with the exception of the way the ring
buffers handles itself internally.
This patch creates two special files in the debugfs/tracing/events
directory:
# cat /debug/tracing/events/header_page
field: u64 timestamp; offset:0; size:8;
field: local_t commit; offset:8; size:8;
field: char data; offset:16; size:4080;
# cat /debug/tracing/events/header_event
type : 2 bits
len : 3 bits
time_delta : 27 bits
array : 32 bits
padding : type == 0
time_extend : type == 1
data : type == 3
This is to allow a userspace app to see if the ring buffer format changes
or not.
[ Impact: allow userspace apps to know of ringbuffer format changes ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ring_buffer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index f0aa486d131c..fac8f1ac6f49 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h | |||
@@ -166,6 +166,11 @@ void ring_buffer_free_read_page(struct ring_buffer *buffer, void *data); | |||
166 | int ring_buffer_read_page(struct ring_buffer *buffer, void **data_page, | 166 | int ring_buffer_read_page(struct ring_buffer *buffer, void **data_page, |
167 | size_t len, int cpu, int full); | 167 | size_t len, int cpu, int full); |
168 | 168 | ||
169 | struct trace_seq; | ||
170 | |||
171 | int ring_buffer_print_entry_header(struct trace_seq *s); | ||
172 | int ring_buffer_print_page_header(struct trace_seq *s); | ||
173 | |||
169 | enum ring_buffer_flags { | 174 | enum ring_buffer_flags { |
170 | RB_FL_OVERWRITE = 1 << 0, | 175 | RB_FL_OVERWRITE = 1 << 0, |
171 | }; | 176 | }; |