Dwarves debugging tools
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: Alan Maguire <alan.maguire@oracle.com>
Cc: Jiri Olsa <olsajiri@gmail.com>,
	acme@kernel.org, ast@kernel.org, andrii@kernel.org,
	eddyz87@gmail.com, qmo@kernel.org, dwarves@vger.kernel.org,
	daniel@iogearbox.net, ihor.solodrai@linux.dev,
	yonghong.song@linux.dev, song@kernel.org, martin.lau@linux.dev,
	memxor@gmail.com, emil@etsalapatis.com, bpf@vger.kernel.org,
	nsc@kernel.org, puranjay@kernel.org, yatsenko@meta.com
Subject: Re: [PATCH v5 dwarves 05/10] pahole: Support inline BTF location encoding
Date: Sun, 11 Oct 2026 12:57:48 +0200	[thread overview]
Message-ID: <astrrAe245p3pBMf@krava> (raw)
In-Reply-To: <0980d4bf-a1f9-4984-ac7c-51141d498e6c@oracle.com>

On Fri, Oct 09, 2026 at 06:32:43PM +0100, Alan Maguire wrote:
> On 09/10/2026 14:12, Jiri Olsa wrote:
> > 
> > On Fri, Oct 02, 2026 at 06:40:33PM +0100, Alan Maguire wrote:
> > 
> > SNIP
> > 
> >> +static int btf_encoder__add_inline_expansion(struct btf_encoder *encoder,
> >> +					     struct inline_expansion *ie)
> >> +{
> >> +	struct ftype *ftype;
> >> +	struct loc *loc;
> >> +	struct parameter *param;
> >> +	uint32_t section_idx, section_offset;
> >> +	int err;
> >> +
> >> +	if (!ie->function || !ie->name ||
> >> +	    !btf_encoder__inline_addr_to_section(encoder, ie->ip.addr,
> >> +						 &section_idx, &section_offset))
> >> +		return 0;
> > 
> > hi,
> > we get inline locations also from .init.text, which then fail kprobe
> > address validation.. is there some usecase for keeping .init.text
> > locations?
> > 
> > I currently disable them in kprobe_multi change I have on top of this,
> > but I wonder we could just drop them completely in here with something
> > like:
> > 
> > 	if (strstarts(encoder->secinfo[section_idx].name, ".init"))
> > 		return 0;
> > 
> > thanks,
> > jirka
> >
> 
> hi Jiri,
> 
> Yeah, it's a great point, and certainly doable. I guess the question is 
> if they would ever be useful? Are there any cases like early boot-time
> tracing that might find them useful at some point say? Or even informationally -
> i.e. function foo() is inlined 700 times in the kernel, 20 in .init.text
> and 680 in .text. Not sure..

actualy looks like ftrace might be able to trwce early after boot, so it
might be handy if we manage to use this via ftrace

> 
> On my kernel the inline.init.text sites are ~2% of the overall number of 
> sites, so it's not nothing in terms of storage, but a lot less than the 
> .text section. So I'm happy to filter them out if we think it makes sense;
> maybe we should add a section option to the inline feature or something?

so it's like around 200kB? I this it's ok to keep it, nevermind ;-)

thanks,
jirka

  reply	other threads:[~2026-10-11 10:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02 17:40 [PATCH v5 dwarves 00/10] Encoding of inline functions using BTF Alan Maguire
2026-10-02 17:40 ` [PATCH v5 dwarves 01/10] dwarf_loader: Add parameter list to inline expansions Alan Maguire
2026-10-02 17:40 ` [PATCH v5 dwarves 02/10] dwarf_loader: Recode inline expansion parameter types Alan Maguire
2026-10-02 17:40 ` [PATCH v5 dwarves 03/10] dwarf_loader: Resolve inline expansion names during recoding Alan Maguire
2026-10-02 17:40 ` [PATCH v5 dwarves 04/10] dwarf_loader: Collect inline expansion location data Alan Maguire
2026-10-02 17:40 ` [PATCH v5 dwarves 05/10] pahole: Support inline BTF location encoding Alan Maguire
2026-10-09 13:12   ` Jiri Olsa
2026-10-09 17:32     ` Alan Maguire
2026-10-11 10:57       ` Jiri Olsa [this message]
2026-10-02 17:40 ` [PATCH v5 dwarves 06/10] btf_loader: Add "inline" annotation for inlined functions Alan Maguire
2026-10-02 17:40 ` [PATCH v5 dwarves 07/10] btf_loader: Record inline sites in CU for BTF Alan Maguire
2026-10-02 17:40 ` [PATCH v5 dwarves 08/10] pfunct: Print inline site information Alan Maguire
2026-10-02 17:40 ` [PATCH v5 dwarves 09/10] tests: Validate inline BTF encoding Alan Maguire
2026-10-02 17:40 ` [PATCH v5 dwarves 10/10] man-pages: Document --inline_sites option Alan Maguire
2026-10-03 10:13 ` [PATCH v5 dwarves 00/10] Encoding of inline functions using BTF Alan Maguire

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=astrrAe245p3pBMf@krava \
    --to=olsajiri@gmail.com \
    --cc=acme@kernel.org \
    --cc=alan.maguire@oracle.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=dwarves@vger.kernel.org \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=nsc@kernel.org \
    --cc=puranjay@kernel.org \
    --cc=qmo@kernel.org \
    --cc=song@kernel.org \
    --cc=yatsenko@meta.com \
    --cc=yonghong.song@linux.dev \
    /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