Linux Modules
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Petr Pavlu <petr.pavlu@suse.com>,
	Sami Tolvanen <samitolvanen@google.com>,
	Daniel Gomez <da.gomez@samsung.com>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	linux-modules@vger.kernel.org
Subject: Re: [RFC PATCH 0/3] tracing: Introduce relative stacktrace
Date: Tue, 28 Jan 2025 12:30:12 -0500	[thread overview]
Message-ID: <20250128123012.4f425227@gandalf.local.home> (raw)
In-Reply-To: <c3842632-cb15-469f-a6e8-8e9ccb3fff56@efficios.com>

On Tue, 28 Jan 2025 11:46:25 -0500
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote:

> I'm trying to wrap my head around what you are trying to achieve here.
> 
> So AFAIU you are aiming to store the relative offset from kernel _text
> and module base text address into the traced events rather than the
> actual address.
> 
> Based on Masami's cover letter, this appears to be  done to make sure
> users can get to this base+offset information even if they cannot read
> kallsyms.
> 
> Why make the tracing fast path more complex for a simple matter of
> accessing this base address information ?
> 
> All you need to have to convert from kernel address to base + offset is:
> 
> - The kernel _text base address,
> - Each loaded module text base address,
> - Unloaded modules events to prune this information.
> 
> What is wrong with simply exporting this base address information in the
> trace buffers rather than rely on kallsyms, and deal with the conversion
> to module name / base+offset at post-processing ?

Hmm, we could probably get away with that too. I think we were focused on
kallsyms, where we wanted a way to not have to distinguish between current
boot info and previous boot info. But when we started pulling in the module
info, it may be possible to do a post processing.

I have said in the past that I wanted module information in the persistent
memory. By doing that this may not be needed. I'll look into it.

-- Steve

  reply	other threads:[~2025-01-28 17:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-28 15:36 [RFC PATCH 0/3] tracing: Introduce relative stacktrace Masami Hiramatsu (Google)
2025-01-28 15:37 ` [RFC PATCH 1/3] tracing: Record stacktrace as the offset from _stext Masami Hiramatsu (Google)
2025-01-28 15:37 ` [RFC PATCH 2/3] tracing: Introduce "rel_stack" option Masami Hiramatsu (Google)
2025-01-28 16:07   ` Steven Rostedt
2025-01-29  0:14     ` Masami Hiramatsu
2025-01-28 15:37 ` [RFC PATCH 3/3] modules: tracing: Add module_text_offsets event Masami Hiramatsu (Google)
2025-01-28 15:46 ` [RFC PATCH 0/3] tracing: Introduce relative stacktrace Mathieu Desnoyers
2025-01-28 16:27   ` Steven Rostedt
2025-01-28 16:46     ` Mathieu Desnoyers
2025-01-28 17:30       ` Steven Rostedt [this message]
2025-01-29  0:58       ` Masami Hiramatsu
2025-01-29  1:09         ` Steven Rostedt
2025-01-29  7:25           ` Masami Hiramatsu
2025-01-29 14:42             ` Steven Rostedt
2025-01-29  0:17     ` Masami Hiramatsu
2025-01-29  0:19   ` Masami Hiramatsu
2025-01-29  0:23   ` Masami Hiramatsu

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=20250128123012.4f425227@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=da.gomez@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mcgrof@kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=petr.pavlu@suse.com \
    --cc=samitolvanen@google.com \
    /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