Darren Reed
2005-Jul-27 14:31 UTC
[dtrace-discuss] Creating new dtrace providers for kernel code
s there a document/web page that describes what is necessary to create a new dtrace provider for the kernel? Are there any obligations with respect to interface stability and documentation for providers in the kernel? Looking at the guide, I only happened upon documentation for creating user programs with dtrace hooks in them. Darren This message posted from opensolaris.org
Jonathan W. Adams
2005-Jul-27 17:00 UTC
[dtrace-discuss] Re: Creating new dtrace providers for kernel code
> Is there a document/web page that describes what is > necessary to create a new dtrace provider for the > kernel?Yes, it''s described in Chapter 22 of the Dynamic Tracing Guide (the sdt provider) http://docs.sun.com/app/docs/doc/817-6223 You just #include <sys/sdt.h>, and add DTRACE_PROBEn(probename, args...); calls to your source. Note that *unlike* userland providers, there isn''t a "provider" argument; all non-Solaris static probes in the kernel end up in the "sdt" provider.> Are there any obligations with respect to interface > stability and documentation for providers in the > kernel?No; your probes will always be "unstable", and they''re scopable by your module name, so the namespace issues aren''t large. Cheers, - jonathan This message posted from opensolaris.org