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