aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/ring_buffer.h
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2021-03-16 12:41:04 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-03-18 12:58:26 -0400
commitefe6196a6bc5bbc84b856316c4687fd24566a95c (patch)
tree97e4205661b0639167ca4c93b33a7c3177757715 /include/linux/ring_buffer.h
parenttracing: Pass buffer of event to trigger operations (diff)
downloadwireguard-linux-efe6196a6bc5bbc84b856316c4687fd24566a95c.tar.xz
wireguard-linux-efe6196a6bc5bbc84b856316c4687fd24566a95c.zip
ring-buffer: Allow ring_buffer_event_time_stamp() to return time stamp of all events
Currently, ring_buffer_event_time_stamp() only returns an accurate time stamp of the event if it has an absolute extended time stamp attached to it. To make it more robust, use the event_stamp() in case the event does not have an absolute value attached to it. This will allow ring_buffer_event_time_stamp() to be used in more cases than just histograms, and it will also allow histograms to not require including absolute values all the time. Link: https://lkml.kernel.org/r/20210316164113.704830885@goodmis.org Reviewed-by: Tom Zanussi <zanussi@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/ring_buffer.h')
-rw-r--r--include/linux/ring_buffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h
index 136ea0997e6d..057b7ed4fe24 100644
--- a/include/linux/ring_buffer.h
+++ b/include/linux/ring_buffer.h
@@ -61,7 +61,8 @@ enum ring_buffer_type {
unsigned ring_buffer_event_length(struct ring_buffer_event *event);
void *ring_buffer_event_data(struct ring_buffer_event *event);
-u64 ring_buffer_event_time_stamp(struct ring_buffer_event *event);
+u64 ring_buffer_event_time_stamp(struct trace_buffer *buffer,
+ struct ring_buffer_event *event);
/*
* ring_buffer_discard_commit will remove an event that has not