Skip to content

libtraceevent: Add ways to read last boot info

Steven Rostedt linux-trace-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2libtraceevent: Add tep_parse_last_boot_info()Documentation/libtraceevent-parse-files.txt Documentation/libtraceevent.txt include/traceevent/event-parse.h +3 more+165 -40 replies
2/2libtraceevent: Add tep_load_modules() APIDocumentation/libtraceevent-parse-files.txt Documentation/libtraceevent.txt include/traceevent/event-parse.h +2 more+216 -120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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(-)
Signature · 1 line
2.51.0