ring-buffer: Add offset of events in dump on mismatch
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 11 Dec 2023 18:16:23 +0000 (13:16 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 19 Dec 2023 04:14:16 +0000 (23:14 -0500)
commit0b9036efd83d4adefab197a1ec98c496c9df44f0
treeaec9be1a93a99693410b4d6a2e21e2f9582537f2
parentd23569979ca1cd139a42c410e0c7b9e6014c3b3a
ring-buffer: Add offset of events in dump on mismatch

On bugs that have the ring buffer timestamp get out of sync, the config
CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS, that checks for it and if it is
detected it causes a dump of the bad sub buffer.

It shows each event and their timestamp as well as the delta in the event.
But it's also good to see the offset into the subbuffer for that event to
know if how close to the end it is.

Also print where the last event actually ended compared to where it was
expected to end.

Link: https://lore.kernel.org/linux-trace-kernel/20231211131623.59eaebd2@gandalf.local.home
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/ring_buffer.c