• Steven Rostedt (Google)'s avatar
    tracing/ring-buffer: Add last_boot_info file to boot instance · 7a1d1e4b
    Steven Rostedt (Google) authored
    If an instance is mapped to memory on boot up, create a new file called
    "last_boot_info" that will hold information that can be used to properly
    parse the raw data in the ring buffer.
    
    It will export the delta of the addresses for text and data from what it
    was from the last boot. It does not expose actually addresses (unless you
    knew what the actual address was from the last boot).
    
    The output will look like:
    
     # cat last_boot_info
     text delta:	-268435456
     data delta:	-268435456
    
    The text and data are kept separate in case they are ever made different.
    
    Link: https://lkml.kernel.org/r/20240612232026.658680738@goodmis.org
    
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Vincent Donnefort <vdonnefort@google.com>
    Cc: Joel Fernandes <joel@joelfernandes.org>
    Cc: Daniel Bristot de Oliveira <bristot@redhat.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Vineeth Pillai <vineeth@bitbyteword.org>
    Cc: Youssef Esmat <youssefesmat@google.com>
    Cc: Beau Belgrave <beaub@linux.microsoft.com>
    Cc: Alexander Graf <graf@amazon.com>
    Cc: Baoquan He <bhe@redhat.com>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: "Paul E. McKenney" <paulmck@kernel.org>
    Cc: David Howells <dhowells@redhat.com>
    Cc: Mike Rapoport <rppt@kernel.org>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: Tony Luck <tony.luck@intel.com>
    Cc: Guenter Roeck <linux@roeck-us.net>
    Cc: Ross Zwisler <zwisler@google.com>
    Cc: Kees Cook <keescook@chromium.org>
    Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
    7a1d1e4b
trace.c 262 KB