1 1.1 christos Perl - DTracing Perl 2 1.1 christos 3 1.1 christos These scripts trace the Perl programming language, and require a version 4 1.1 christos of Perl to be built with the DTrace probes patch applied. 5 1.1 christos 6 1.1 christos The Perl DTrace provider was originally written by Alan Burlison, and 7 1.1 christos later rewritten by Richard Dawe. These scripts were written and tested 8 1.1 christos with Richard's patch to perl, which can be found in the comments on 9 1.1 christos Alan's original blog entry, 10 1.1 christos 11 1.1 christos http://blogs.sun.com/alanbur/entry/dtrace_and_perl 12 1.1 christos 13 1.1 christos To get this and these scripts working, the rough steps are, 14 1.1 christos 15 1.1 christos 1. Download and extract perl 5.8.8 (www.cpan.org) 16 1.1 christos 2. Download Richard's patch 17 1.1 christos 3. Apply Richard's patch (gpatch -p1 -i patchfile) 18 1.1 christos 4. sh Configure 19 1.1 christos 5. make perldtrace.h 20 1.1 christos 6. /usr/sbin/dtrace -h -s perldtrace.d -o perldtrace.h 21 1.1 christos 7. make 22 1.1 christos 23 1.1 christos If things go awry, you might find help by asking on the 24 1.1 christos dtrace-discuss (a] opensolaris.org mailing list. 25 1.1 christos 26 1.1 christos Since the DTrace Perl provider may be developed further, there is a chance 27 1.1 christos that it has changed slightly by the time you are reading this, causing 28 1.1 christos these scripts to either break or behave oddly. Firstly, check for newer 29 1.1 christos versions of the DTraceToolkit; if it hasn't been updated and you need 30 1.1 christos to use these scripts immediately, then updating them shouldn't take 31 1.1 christos too long. The following was the state of the provider when these scripts 32 1.1 christos were written - check for changes and update the scripts accordingly, 33 1.1 christos 34 1.1 christos provider perl { 35 1.1 christos probe sub-entry(subroutine, file, lineno) 36 1.1 christos probe sub-return(subroutine, file, lineno) 37 1.1 christos }; 38 1.1 christos 39