public inbox for linux-trace-devel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-trace-devel@vger.kernel.org,
	Masami Hiramatsu <mhiramat@kernel.org>
Subject: Re: [PATCH 0/2] trace-cmd record: Handle persistent ring buffers
Date: Wed, 4 Feb 2026 23:58:37 +0900	[thread overview]
Message-ID: <20260204235837.71ccaa2f4356c598e5f43f42@kernel.org> (raw)
In-Reply-To: <20260204012244.2135465-1-rostedt@goodmis.org>

On Tue,  3 Feb 2026 20:18:04 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> 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.
> 

Both looks good to me. BTW, both only records the information, and
resolving symbol will be the next series?

Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

for the series.

Thank you,

> 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
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

      parent reply	other threads:[~2026-02-04 14:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Masami Hiramatsu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260204235837.71ccaa2f4356c598e5f43f42@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox