Discussion:
Adding USDT probes to complex products
(too old to reply)
Chris Ridd
2011-08-03 13:12:21 UTC
Permalink
Raw Message
Hi,

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!

Chris
Adam Leventhal
2011-08-04 07:17:16 UTC
Permalink
Raw Message
Hey Chris,

It's worth trying out, but I don't believe that DTrace supports a
provider that is effectively spread between shared objects. The
sure-fire approach is to have a different provider for each shared
object and executable.

Adam
Post by Chris Ridd
Hi,
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!
Chris
_______________________________________________
dtrace-discuss mailing list
--
Adam Leventhal, Delphix
http://dtrace.org/blogs/ahl

275 Middlefield Road, Suite 50
Menlo Park, CA 94025
http://www.delphix.com
Loading...