diff options
author | Tom Zanussi <tzanussi@gmail.com> | 2009-03-22 03:30:49 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-22 18:38:25 +0100 |
commit | 2d622719f1572ef31e0616444a515eba3094d050 (patch) | |
tree | f9bffcdca6289f141fb53a38dd9f32af8c71efad /include/linux/ring_buffer.h | |
parent | cf027f645e6aee4f0ca6197a6b6a57f327fdb13f (diff) | |
download | blackbird-op-linux-2d622719f1572ef31e0616444a515eba3094d050.tar.gz blackbird-op-linux-2d622719f1572ef31e0616444a515eba3094d050.zip |
tracing: add ring_buffer_event_discard() to ring buffer
This patch overloads RINGBUF_TYPE_PADDING to provide a way to discard
events from the ring buffer, for the event-filtering mechanism
introduced in a subsequent patch.
I did the initial version but thanks to Steven Rostedt for adding
the parts that actually made it work. ;-)
Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/ring_buffer.h')
-rw-r--r-- | include/linux/ring_buffer.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index 9e6052bd1a1c..e1b7b2173885 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h @@ -18,10 +18,13 @@ struct ring_buffer_event { /** * enum ring_buffer_type - internal ring buffer types * - * @RINGBUF_TYPE_PADDING: Left over page padding - * array is ignored - * size is variable depending on how much + * @RINGBUF_TYPE_PADDING: Left over page padding or discarded event + * If time_delta is 0: + * array is ignored + * size is variable depending on how much * padding is needed + * If time_delta is non zero: + * everything else same as RINGBUF_TYPE_DATA * * @RINGBUF_TYPE_TIME_EXTEND: Extend the time delta * array[0] = time delta (28 .. 59) @@ -65,6 +68,8 @@ ring_buffer_event_time_delta(struct ring_buffer_event *event) return event->time_delta; } +void ring_buffer_event_discard(struct ring_buffer_event *event); + /* * size is in bytes for each per CPU buffer. */ |