Skip to content

Commit e53ba17

Browse files
mhiramatrostedt
authored andcommitted
tracing/Documentation: Add a section about backup instance
Add a section about backup instance to the debugging.rst. Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://patch.msgid.link/177502548479.1311542.7062269603547001007.stgit@mhiramat.tok.corp.google.com Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent eca33fd commit e53ba17

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Documentation/trace/debugging.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,22 @@ If setting it from the kernel command line, it is recommended to also
159159
disable tracing with the "traceoff" flag, and enable tracing after boot up.
160160
Otherwise the trace from the most recent boot will be mixed with the trace
161161
from the previous boot, and may make it confusing to read.
162+
163+
Using a backup instance for keeping previous boot data
164+
------------------------------------------------------
165+
166+
It is also possible to record trace data at system boot time by specifying
167+
events with the persistent ring buffer, but in this case the data before the
168+
reboot will be lost before it can be read. This problem can be solved by a
169+
backup instance. From the kernel command line::
170+
171+
reserve_mem=12M:4096:trace trace_instance=boot_map@trace,sched,irq trace_instance=backup=boot_map
172+
173+
On boot up, the previous data in the "boot_map" is copied to the "backup"
174+
instance, and the "sched:*" and "irq:*" events for the current boot are traced
175+
in the "boot_map". Thus the user can read the previous boot data from the "backup"
176+
instance without stopping the trace.
177+
178+
Note that this "backup" instance is readonly, and will be removed automatically
179+
if you clear the trace data or read out all trace data from the "trace_pipe"
180+
or the "trace_pipe_raw" files.

0 commit comments

Comments
 (0)