Re: DTrace SDT probes in kernel module — how to?

Alan Somers asomers at freebsd.org
Thu Jun 6 17:45:58 UTC 2019


On Thu, Jun 6, 2019 at 11:43 AM Lev Serebryakov <lev at freebsd.org> wrote:
>
> Hello Freebsd-hackers,
>
>    What should I do to add SDT probes into kernel module. I've tried to add simple
>
> DTRACE_PROBE1(module__name, type, value);
>
>   to source code. No errors, no probes after module load. I've added WITH_CTF=1 to make
>  command line. Warnings from ctfmerge, no probes after module load.
>
>   What is proper way to add SDT probes to module and how should I build it?
>
> --
> Best regards,
>  Lev                          mailto:lev at FreeBSD.org

How are you building the module?  Typing "make" in
sys/modules/whatever doesn't build the dtrace probes.  Presumably that
could be fixed, but I've never tried.  However, if you do a full "make
buildkernel" then you will get dtrace probes.
-Alan


More information about the freebsd-hackers mailing list