[PATCH 0/2] libtraceevent: Add ways to read last boot info

Steven Rostedt <[email protected]> Tue, 3 Feb 2026 18:12:24 -0500
Newsgroups org.kernel.vger.linux-trace-devel
Message-ID <[email protected]>
From: "Steven Rostedt (Google)" <[email protected]>

When a persistent ring buffer is used to record a trace and the kernel
crashes (or simply reboots), the function addresses in the buffer from the
previous boot will not match the funciton addresses in the kallsyms of the
current boot.

To solve this, the kernel creates a "last_boot_info" file in the instance
directory. This holds the offsets of where "_text" is located for the core
kernel code as well as where each module is loaded.

Add API to read the last_boot_info file as well as /proc/modules and use
this to calculate function addresses based on the kallsyms of the current
boot and the last_boot_info file that has the information of the previous
boot.

Steven Rostedt (Google) (2):
  libtraceevent: Add tep_parse_last_boot_info()
  libtraceevent: Add tep_load_modules() API

 Documentation/libtraceevent-parse-files.txt |  80 +++++-
 Documentation/libtraceevent.txt             |   2 +
 include/traceevent/event-parse.h            |   2 +
 src/event-parse-local.h                     |   9 +
 src/event-parse.c                           | 290 +++++++++++++++++++-
 src/trace-btf.c                             |   6 +
 6 files changed, 377 insertions(+), 12 deletions(-)

-- 
2.51.0