From: Alan Maguire <almagui@kernel.org>
To: kris.van.hees@oracle.com
Cc: alan.maguire@oracle.com, dtrace-devel@oss.oracle.com,
dtrace@lists.linux.dev
Subject: Re: [PATCH v5 03/11] libdtrace: avoid BTF probes for ranged built-in modules
Date: Tue, 20 Oct 2026 10:58:04 +0100 [thread overview]
Message-ID: <abe99f45-13f5-43e0-b977-3a3aea9749ac@kernel.org> (raw)
In-Reply-To: <asYdAbzPN9i-OSFN@kvh-deb-bpf>
>> + /*
>> + * modules.builtin.ranges identifies this object as linked into vmlinux.
>> + * Such objects cannot have a per-module BTF object, so use the shared
>> + * vmlinux BTF directly. Retain the usual lookup for an explicitly
>> + * configured BTF directory and every other module.
>> + */
>> + if (dtp->dt_btf_path == NULL && (dmp->dm_flags & DT_DM_KERN_BUILTIN)) {
>> + dmp->dm_btf = dtp->dt_shared_btf;
>> + dt_dprintf("Using shared vmlinux BTF for built-in module %s.\n",
>> + dmp->dm_name);
>> + return;
>> + }
>
> This does not look right to me, because if a dt_btf_path is specified, I
> would expect the handle to still provided a handle-wide shared CTF and
> BTF, even if it may be different from the system-wide shared CTF and
> BTF. In other words, I think that sharing should be based on:
>
> System standard CTF and BTF -> dt_shared_ctf and dt_share_btf globals
> Non-standard CTF or BTF -> dtp->dt_shared_ctf and dtp->dt_shared_btf
>
> So dropping the dtp->dt_btf_path == NULL in the conditional clause above
> should be fine, right?
Yeah, certainly in the case of BTF we should always prioritize the
system-provided BTF since it travels directly with the kernel in
question.
next prev parent reply other threads:[~2026-10-20 9:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 16:10 [PATCH v5 00/11] Add python, PCP support via libdtrace interfaces Alan Maguire
2026-08-21 16:10 ` [PATCH v5 01/11] libdtrace: Support multiple DTrace handles per process Alan Maguire
2026-10-07 9:26 ` Kris Van Hees
2026-08-21 16:10 ` [PATCH v5 02/11] libdtrace: share vmlinux BTF/CTF globally to support faster startup Alan Maguire
2026-10-07 10:05 ` Kris Van Hees
2026-08-21 16:10 ` [PATCH v5 03/11] libdtrace: avoid BTF probes for ranged built-in modules Alan Maguire
2026-10-07 10:20 ` Kris Van Hees
2026-10-20 9:58 ` Alan Maguire [this message]
2026-08-21 16:10 ` [PATCH v5 04/11] libdtrace: Add aggregation key/value computation APIs Alan Maguire
2026-10-07 10:51 ` Kris Van Hees
2026-08-21 16:10 ` [PATCH v5 05/11] python: Add cpython bindings for libdtrace Alan Maguire
2026-10-05 16:23 ` Kris Van Hees
2026-08-21 16:10 ` [PATCH v5 06/11] dtrace.spec: add python bindings packaging Alan Maguire
2026-08-21 16:10 ` [PATCH v5 07/11] runtest.sh: Prepare Python bindings for in-tree testing Alan Maguire
2026-08-21 16:10 ` [PATCH v5 08/11] test: add tests for python bindings Alan Maguire
2026-08-21 16:10 ` [PATCH v5 09/11] dtrace: Add a PCP PMDA to expose DTrace data as metrics Alan Maguire
2026-08-21 16:10 ` [PATCH v5 10/11] dtrace.spec: Add PCP PMDA packaging pcp-pmda-dtrace Alan Maguire
2026-08-21 16:10 ` [PATCH v5 11/11] test: Add a test for the PCP ManagedDTraceScript interface Alan Maguire
2026-10-05 16:28 ` Kris Van Hees
2026-10-20 15:49 ` 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=abe99f45-13f5-43e0-b977-3a3aea9749ac@kernel.org \
--to=almagui@kernel.org \
--cc=alan.maguire@oracle.com \
--cc=dtrace-devel@oss.oracle.com \
--cc=dtrace@lists.linux.dev \
--cc=kris.van.hees@oracle.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