Re: Running DTrace in container

Jacob Carlborg <[email protected]> Sat, 11 Apr 2026 13:34:13 +0200
Newsgroups dev.linux.lists.dtrace
Message-ID <[email protected]>
I apologize if this message is not threaded correctly. Apparently it=E2=80=
=99s not possible reply to multiple e-mail addresses with Apple=E2=80=99s =
Hide My Email feature.

> On 30 Mar 2026, at 20:30, Kris Van Hees <[email protected]> =
wrote:
>=20
> The first thing that comes to mind is that you are configuring dtrace =
with the
> --kernels=3D... options etc.  That should not be needed for regular =
building of
> DTrace on supported kernels.  Those options only come into play when =
translator
> files are to be generated.  The provided files should be sufficient =
for all
> regular upstream kernels from 5.2 up to the current latest upstream =
kernel.
>=20
> We support those options in order to generate new translators when a =
kernel
> change occurs that causes the latest provided set of files to not work =
with a
> new kernel.  That is thankfully pretty rare.
>=20
> So, I would re-try with building dtrace  using the following configure =
step:
>=20
> ./configure \
> --libdir=3D /lib/aarch64-linux-gnu \
> BPFC=3Dbpf-gcc BPFLD=3Dbpf-ld

I gave that a try but I still get the same issue.

> You also should not have to download the kernel source tree or =
anything like
> that.  DTrace should operate fine without it.

Aha I see, the readme mentions that for building, the kernel headers are =
required. But since I=E2=80=99m building this in a container, the =
version of the kernel will not necessarily match the kernel that a given =
distribution is running and therefore I could not install the kernel =
headers from the package manager.

A related followup question: when building DTrace, is that tied to the =
currently running kernel? So if I want to use DTrace on different =
versions of the kernel, do I need to build DTrace once for each kernel?

--
/Jacob Carlborg=