excellent stuff Andy!

To start with the obvious :)

Due to the lack of ustack helper, I am hoping to add a stack probe - I really could do with being able to write a dtrace that shows me a perl stack trace on file system access - yesterday I spent a borish day using inotifywait and some perl tracing on linux :/


Another other thing I'm missing is the arguments to ops. Oh, and can I trace exception throws and catches?


Sven

Andy Armstrong wrote:
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?docid=-8002801113289007228

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.



--
Professional Wiki Innovation and Support Sven Dowideit - http://DistributedINFORMATION.com A WikiRing Partner http://wikiring.com

Reply via email to