As of patch 32953 dtrace support is in bleadperl (5.11.0). The probes
are based on Alan Burlinson's original blog post on the subject:

http://blogs.sun.com/alanbur/date/20050909

By guarding the probes with PERL_SUB_*_ENABLED the performance hit is
unmeasurable.

All the necessary bits already existed in the wild. I just assembled
them and made the necessary changes to Perl's Configure script. The
patched Perl works with the examples in DTraceToolkit.

Currently we have probes on subroutine entry and return.

Next I'd like to solicit input about what other probes would be
useful. I have Sven Dowideit's patch that adds probes on new__sv,
del__sv (creation and deletion of values) and, main__enter, main__exit
(interpreter lifecycle) and load__module (require, use etc).

Where else might we usefully probe? What would people find useful?

-- notes --

I'm crossposting this to what I hope are a few interested lists. If
anyone reading this needs a primer on dtrace this video is highly
recommended:

http://video.google.com/videoplay?do...01113289007228

It's 90 minutes of your life but it'll be time well spent

If anyone would like to try bleadperl it is available here:

rsync -avz --exclude .svn/ --delete \
rsync://ftp.linux.activestate.com/perl-current/ bleadperl

You can configure it like this:

../Configure -de -Dusedevel -Dinc_version_list=none \
-Dprefix=$install -Dldflags=-Dman3ext=3pm \
-Duseithreads -Duseshrplib -Uversiononly \
-Dusedtrace

where $install is your preferred install base.

Right now ./Configure displays a harmless error about '!' being an
unknown command just after the questions. There's a patch in the
pipeline to fix that.

--
Andy Armstrong, Hexten