tracing: Record trace_clock and recover when reboot
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Wed, 14 May 2025 07:04:18 +0000 (16:04 +0900)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 14 May 2025 15:23:28 +0000 (11:23 -0400)
commit2632a2013f58f0aab4b9fd042e67d78740ba0996
tree669d3bc36697de85eb185b0cdfc826082dd0596f
parent155fd6c3e2f02efdc71a9b62888942efc217aff0
tracing: Record trace_clock and recover when reboot

Record trace_clock information in the trace_scratch area and recover
the trace_clock when boot, so that reader can docode the timestamp
correctly.
Note that since most trace_clocks records the timestamp in nano-
seconds, this is not a bug. But some trace_clock, like counter and
tsc will record the counter value. Only for those trace_clock user
needs this information.

Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/174720625803.1925039.1815089037443798944.stgit@mhiramat.tok.corp.google.com
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace.c