Thread (7 messages) read the whole thread 7 messages, 2 authors, 2025-05-15

Re: [RFC PATCH] tracing: ring_buffer: Rewind persistent ring buffer when reboot

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2025-05-14 00:36:23
Also in: lkml

On Tue, 13 May 2025 20:32:37 -0400
Steven Rostedt [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -9628,6 +9636,14 @@ static void setup_trace_scratch(struct trace_array *tr,
 
 	/* Scan modules to make text delta for modules. */
 	module_for_each_mod(make_mod_delta, tr);
+
+	/* Set trace_clock as the same of the previous boot. */
+	if (tscratch->clock_id != tr->clock_id) {
+		if (tracing_set_clock(tr, trace_clocks[tscratch->clock_id].name) < 0) {
+			pr_info("the previous trace_clock info is not valid.");
+			goto reset;
+		}
+	}
 	return;
  reset:
 	/* Invalid trace modules */

Hmm, somehow I got your other patch in here :-D

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help