ring-buffer: Allow ring_buffer_event_time_stamp() to return time stamp of all events
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 16 Mar 2021 16:41:04 +0000 (12:41 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 18 Mar 2021 16:58:26 +0000 (12:58 -0400)
commitefe6196a6bc5bbc84b856316c4687fd24566a95c
tree97e4205661b0639167ca4c93b33a7c3177757715
parentb47e330231acbf4506b049643145cc64268a1940
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>
include/linux/ring_buffer.h
kernel/trace/ring_buffer.c
kernel/trace/trace_events_hist.c