Commit 82ac952b authored by Steven Rostedt (Red Hat)'s avatar Steven Rostedt (Red Hat) Committed by Arnaldo Carvalho de Melo

tools lib traceevent: Add way to find sub buffer boundary

For debugging purposes, it may be helpful for the kbuffer library to flag
when crossing a sub buffer.
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20150324135923.650983637@goodmis.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent c5e69192
...@@ -729,3 +729,14 @@ void kbuffer_set_old_format(struct kbuffer *kbuf) ...@@ -729,3 +729,14 @@ void kbuffer_set_old_format(struct kbuffer *kbuf)
kbuf->next_event = __old_next_event; kbuf->next_event = __old_next_event;
} }
/**
* kbuffer_start_of_data - return offset of where data starts on subbuffer
* @kbuf: The kbuffer
*
* Returns the location on the subbuffer where the data starts.
*/
int kbuffer_start_of_data(struct kbuffer *kbuf)
{
return kbuf->start;
}
...@@ -63,5 +63,6 @@ int kbuffer_missed_events(struct kbuffer *kbuf); ...@@ -63,5 +63,6 @@ int kbuffer_missed_events(struct kbuffer *kbuf);
int kbuffer_subbuffer_size(struct kbuffer *kbuf); int kbuffer_subbuffer_size(struct kbuffer *kbuf);
void kbuffer_set_old_format(struct kbuffer *kbuf); void kbuffer_set_old_format(struct kbuffer *kbuf);
int kbuffer_start_of_data(struct kbuffer *kbuf);
#endif /* _K_BUFFER_H */ #endif /* _K_BUFFER_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment