Linux DTrace development list
 help / color / mirror / Atom feed
From: Nick Alcock <nix@esperi.org.uk>
To: Kris Van Hees <kris.van.hees@oracle.com>
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [PATCH 04/20] btf: deprecate dt_shared_btf and introduce btf->parent instead
Date: Fri, 06 Nov 2026 12:45:35 +0000	[thread overview]
Message-ID: <87zevmt9g0.fsf@esperi.org.uk> (raw)
In-Reply-To: <031b190cb7679c63673baf89f0389b9a@oracle.com>

On 30 Oct 2026, Kris Van Hees uttered the following:

> All module BTF (except vmlinux) share a common ancestor (the BTF data of
> the vmlinux module).  Represent this with a btf->parent reference.
>
> For vmlinux, btf->parent will be NULL.

This seems like a good idea regardless.

> Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>

Reviewed-by: Nick Alcock <nix@esperi.org.uk>

> ---
>  libdtrace/dt_btf.c                        | 517 +++++++++++++---------
>  libdtrace/dt_btf.h                        |  19 +-
>  libdtrace/dt_impl.h                       |   2 +-
>  libdtrace/dt_module.c                     |  18 +-
>  libdtrace/dt_open.c                       |   2 -
>  libdtrace/dt_prov_fbt.c                   |  16 +-
>  test/unittest/btf/test.x                  |   8 +
>  test/unittest/btf/tst.elf-vmlinux.sh      |  31 ++
>  test/unittest/btf/tst.elf-vmlinux.x       |   8 +
>  test/unittest/btf/tst.invalid-fallback.sh |  31 ++
>  test/unittest/btf/tst.invalid-fallback.x  |   8 +
>  test/unittest/btf/tst.module-btf.sh       |  46 ++
>  test/unittest/btf/tst.module-btf.x        |  13 +
>  test/unittest/btf/tst.module-local.sh     |  63 +++
>  test/unittest/btf/tst.module-local.x      |  18 +
>  test/unittest/btf/tst.module-parent.sh    |  46 ++
>  test/unittest/btf/tst.module-parent.x     |  13 +
>  test/unittest/btf/tst.raw-vmlinux.sh      |  30 ++
>  test/unittest/options/tst.ctf-only.sh     |  27 ++
>  test/unittest/options/tst.ctf-only.x      |   8 +
>  20 files changed, 693 insertions(+), 231 deletions(-)
>  create mode 100755 test/unittest/btf/test.x
>  create mode 100755 test/unittest/btf/tst.elf-vmlinux.sh
>  create mode 100755 test/unittest/btf/tst.elf-vmlinux.x
>  create mode 100755 test/unittest/btf/tst.invalid-fallback.sh
>  create mode 100755 test/unittest/btf/tst.invalid-fallback.x
>  create mode 100755 test/unittest/btf/tst.module-btf.sh
>  create mode 100755 test/unittest/btf/tst.module-btf.x
>  create mode 100755 test/unittest/btf/tst.module-local.sh
>  create mode 100755 test/unittest/btf/tst.module-local.x
>  create mode 100755 test/unittest/btf/tst.module-parent.sh
>  create mode 100755 test/unittest/btf/tst.module-parent.x
>  create mode 100755 test/unittest/btf/tst.raw-vmlinux.sh
>  create mode 100755 test/unittest/options/tst.ctf-only.sh
>  create mode 100755 test/unittest/options/tst.ctf-only.x
>
> diff --git a/libdtrace/dt_btf.c b/libdtrace/dt_btf.c
> index dce44987..194a251c 100644
> --- a/libdtrace/dt_btf.c
> +++ b/libdtrace/dt_btf.c
> @@ -32,8 +32,8 @@ struct dt_btf {
>  	size_t		size;			/* raw BTF data size */
>  	btf_header_t	*hdr;			/* BTF header */
>  	char		*sdata;			/* string data */
> -	uint32_t	ssize;			/* string data size */

(this seems to be unused, so dropping it is ok.)

> +	/*
> +	 * If we were not able to read the BTF data, and we are constructing
> +	 * 'shared_ctf', we need space for the default 'void' type.
> +	 */

Isn't shared_ctf already gone by this point?

-- 
NULL && (void)

  reply	other threads:[~2026-11-06 12:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 19:36 [PATCH 04/20] btf: deprecate dt_shared_btf and introduce btf->parent instead Kris Van Hees
2026-11-06 12:45 ` Nick Alcock [this message]
2026-11-07 15:39   ` Kris Van Hees

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=87zevmt9g0.fsf@esperi.org.uk \
    --to=nix@esperi.org.uk \
    --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