2011-08-03 13:12:21 UTC
I'm looking to add USDT probes to our shared libraries and programs, and am having some problems working out how to integrate dtrace into a slightly complicated build. This is on Solaris BTW, I appreciate that USDT probes in OS X (and maybe FreeBSD) are built differently.
I'm planning to use a single provider in my .d file.
Unfortunately I need to scatter probes from this provider into a variety of things that we build, and I'm having difficulty working out the best way to do this. In short, I think, where should I be using the object file produced by dtrace -G?
So we build some shared libraries that will contain some probes. Should a shared library contain the output of dtrace -G on the library's o files?
A number of executables also have some probes. Should I be running dtrace -G on all the .o files used in the executable, and linking that one in too? If the executable is loading the previously built shared library with probes from the same provider, will that work? Even if the same probes are present in both?
Or should I arrange to have a different provider in each shared library and executable?
Thanks in advance for any thoughts or advice!