When you say "straight from the dtrace book", I assume you mean
the soon-to-be-published book?

If that is the case, please allow me to clarify. Not every invocation of dtrace,
both one-liners and scripts, that are in the book (and there are hundreds) is
tested and guaranteed to work under all three operating systems
(Solaris, OS X, FreeBSD). In fact, some will not work across different Solaris
releases, depending on (for example) which provider is used.

We are very clear in the book with our examples about the differences in
the underlying implementations. There are a great many scripts and one-liners
in the book that will only work on Solaris.

The good news is that, in addition to the actual examples, there is a lot of
emphasis on methodology in the book, such that you can use DTrace
to figure out which probes/modules, etc, you should be instrumenting
based on the problem you are trying to solve or what you are trying
to observe. 

For example, if you change your D to;

pid$target:::entry { @[probemod] = count(); }'

You will see what the actual module names are available for you
to instrument.

Binaries on OS X link to libSystem.B.dylib for common functions.

Thanks
/jim

On Dec 7, 2010, at 3:09 PM, Hans Stimer wrote:

> Under osx 10.6.5:
> 
> ~ $ sudo dtrace -n 'pid$target:libc::entry { @[probefunc] = count(); }' -c 
> date
> Tue Dec  7 11:40:59 PST 2010
> dtrace: invalid probe specifier pid$target:libc::entry { @[probefunc] = 
> count(); }: probe description pid94942:libc::entry does not match any probes
> 
> This is an example straight from the dtrace book which claims to test under 
> osx, so I'm guessing that something broke in osx?
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss@opensolaris.org

_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to