ring-buffer: Add verifier for using ring_buffer_event_time_stamp()
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 16 Mar 2021 16:41:06 +0000 (12:41 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 18 Mar 2021 16:58:26 +0000 (12:58 -0400)
commita948c69d6fb1ba749a958a8a87d4eecdda28989d
treeaecdb4fdbe3fe578be4e4aed4cff8e84431c0496
parentb94bc80df64823e676b506f8de7dcf6a688d681e
ring-buffer: Add verifier for using ring_buffer_event_time_stamp()

The ring_buffer_event_time_stamp() must be only called by an event that has
not been committed yet, and is on the buffer that is passed in. This was
used to help debug converting the histogram logic over to using the new
time stamp code, and was proven to be very useful.

Add a verifier that can check that this is the case, and extra WARN_ONs to
catch unexpected use cases.

Link: https://lkml.kernel.org/r/20210316164113.987294354@goodmis.org
Reviewed-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/ring_buffer.c