[DTrace-devel] [PATCH 3/3] dlibs: report missing CTF and BTF data for vmlinux
Nick Alcock
nick.alcock at oracle.com
Tue Jun 24 14:18:47 UTC 2025
On 24 Jun 2025, Kris Van Hees via DTrace-devel spake thusly:
> If the kernel is not compiled with CTF and/or BTF enabled, DTrace will
> not work. This used to result in an assert, which is rather harsh and
> not user friendly. We now report a nice error.
>
> Doing this in the pragma 'depends on' handling may seem odd but that is
> where the initial type data load is triggered. If for some strange
> reason no dlibs exist (and thus no 'depends on' are encountered), the
> compiler will complain about missing type information anyway.
I'm honestly wondering if we should do a type lookup for something
trivial that will always be present in a hardwired fashion, so we don't
have to depend on a side effect this delicate (which will fail the first
time a .d is introduced which sorts lexicographically before any
existing one, depends on any types other than the built-in ones -- which
is why errno.d doesn't trigger a type lookup -- and does not start with
#pragma D depends_on module vmlinux
like io.d happens to.)
> Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Nick Alcock <nick.alcock at oracle.com>
even if I think this feels wrong, it does work...
More information about the DTrace-devel
mailing list