]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit529a6310c594c23c15c16f85d78b65c206f48dab
tree97e4205661b0639167ca4c93b33a7c3177757715
parente21a69b3019e25a00f3910b644b1c069e8ecbc32
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