public inbox for linux-trace-devel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] trace-cmd record: Handle persistent ring buffers
@ 2026-02-04  1:18 Steven Rostedt
  2026-02-04  1:18 ` [PATCH 1/2] trace-cmd record: Handle last_boot_info file Steven Rostedt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Steven Rostedt @ 2026-02-04  1:18 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Masami Hiramatsu, Steven Rostedt (Google)

From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

Now that a ring buffer instance can be from a previous boot, allow trace-cmd
to be able to read its content and still get the function names from the
addresses.

If a persistent ring buffer is from a previous boot, it will have a
"last_boot_info" file. This contains the address of the _text section of the
core kernel as well as where all the modules were loaded. This can be used
to calculate the addresses in the previous boot ring buffer to the addresses
in the current kallsyms to find out the name of the function an address
belongs to.

Also if the last_boot_info file exists, the /proc/modules file is read. This
is because functions in modules needs to have its address calculated from
where its module was loaded in the previous boot to where it is loaded in
the current boot. The last_boot_info contains the addresses of the modules
of the previous boot, and /proc/modules contains the addresses of the
modules from the current boot. With both the addresses of functions in
modules can be converted to the corresponding address in kallsyms.

Steven Rostedt (Google) (2):
  trace-cmd record: Handle last_boot_info file
  trace-cmd record: Add section for /proc/modules

 .../trace-cmd/trace-cmd.dat.v7.5.txt          | 31 +++++++++--
 .../include/private/trace-cmd-private.h       |  3 ++
 lib/trace-cmd/trace-ftrace.c                  |  4 +-
 lib/trace-cmd/trace-input.c                   | 31 +++++++++++
 lib/trace-cmd/trace-output.c                  | 32 ++++++++++++
 tracecmd/include/trace-local.h                |  2 +
 tracecmd/trace-dump.c                         | 32 ++++++++++++
 tracecmd/trace-record.c                       | 52 +++++++++++++++++++
 8 files changed, 180 insertions(+), 7 deletions(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-04 14:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-04  1:18 [PATCH 0/2] trace-cmd record: Handle persistent ring buffers Steven Rostedt
2026-02-04  1:18 ` [PATCH 1/2] trace-cmd record: Handle last_boot_info file Steven Rostedt
2026-02-04  1:18 ` [PATCH 2/2] trace-cmd record: Add section for /proc/modules Steven Rostedt
2026-02-04 14:58 ` [PATCH 0/2] trace-cmd record: Handle persistent ring buffers Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox