golden hour
/usr/share/perl5/pod
⬆️ Go Up
Upload
File/Folder
Size
Actions
perl.pod
16.28 KB
Del
OK
perl5004delta.pod
54.92 KB
Del
OK
perl5005delta.pod
33.48 KB
Del
OK
perl5100delta.pod
54.23 KB
Del
OK
perl5101delta.pod
42.86 KB
Del
OK
perl5120delta.pod
87.18 KB
Del
OK
perl5121delta.pod
9.9 KB
Del
OK
perl5122delta.pod
9.38 KB
Del
OK
perl5123delta.pod
4 KB
Del
OK
perl5124delta.pod
3.59 KB
Del
OK
perl5125delta.pod
7.5 KB
Del
OK
perl5140delta.pod
140.94 KB
Del
OK
perl5141delta.pod
7.78 KB
Del
OK
perl5142delta.pod
6.73 KB
Del
OK
perl5143delta.pod
7.58 KB
Del
OK
perl5144delta.pod
6.18 KB
Del
OK
perl5160delta.pod
130.52 KB
Del
OK
perl5161delta.pod
6 KB
Del
OK
perl5162delta.pod
3.51 KB
Del
OK
perl5163delta.pod
3.99 KB
Del
OK
perl5180delta.pod
116.63 KB
Del
OK
perl5181delta.pod
6.44 KB
Del
OK
perl5182delta.pod
5.21 KB
Del
OK
perl5184delta.pod
4.53 KB
Del
OK
perl5200delta.pod
112.99 KB
Del
OK
perl5201delta.pod
10.64 KB
Del
OK
perl5202delta.pod
12.22 KB
Del
OK
perl5203delta.pod
9.17 KB
Del
OK
perl5220delta.pod
127.89 KB
Del
OK
perl5221delta.pod
10.51 KB
Del
OK
perl5222delta.pod
12.33 KB
Del
OK
perl5223delta.pod
8.26 KB
Del
OK
perl5224delta.pod
4.36 KB
Del
OK
perl5240delta.pod
63.4 KB
Del
OK
perl5241delta.pod
8.02 KB
Del
OK
perl5242delta.pod
4.02 KB
Del
OK
perl5243delta.pod
11.16 KB
Del
OK
perl5244delta.pod
4.4 KB
Del
OK
perl5260delta.pod
99.45 KB
Del
OK
perl5261delta.pod
7.74 KB
Del
OK
perl5262delta.pod
7.7 KB
Del
OK
perl5263delta.pod
6.9 KB
Del
OK
perl5280delta.pod
70.42 KB
Del
OK
perl5281delta.pod
4.53 KB
Del
OK
perl5282delta.pod
6.05 KB
Del
OK
perl5283delta.pod
4.99 KB
Del
OK
perl5300delta.pod
40.31 KB
Del
OK
perl5301delta.pod
5.6 KB
Del
OK
perl5302delta.pod
4.57 KB
Del
OK
perl5303delta.pod
4.86 KB
Del
OK
perl5320delta.pod
53.32 KB
Del
OK
perl5321delta.pod
6.84 KB
Del
OK
perl561delta.pod
121.79 KB
Del
OK
perl56delta.pod
104.69 KB
Del
OK
perl581delta.pod
37.17 KB
Del
OK
perl582delta.pod
4.37 KB
Del
OK
perl583delta.pod
6.19 KB
Del
OK
perl584delta.pod
7.19 KB
Del
OK
perl585delta.pod
5.75 KB
Del
OK
perl586delta.pod
4.54 KB
Del
OK
perl587delta.pod
8.16 KB
Del
OK
perl588delta.pod
24.69 KB
Del
OK
perl589delta.pod
52.64 KB
Del
OK
perl58delta.pod
112.47 KB
Del
OK
perlaix.pod
19.96 KB
Del
OK
perlamiga.pod
5.61 KB
Del
OK
perlandroid.pod
8.03 KB
Del
OK
perlapi.pod
481.55 KB
Del
OK
perlapio.pod
20.84 KB
Del
OK
perlartistic.pod
6.85 KB
Del
OK
perlbook.pod
8.19 KB
Del
OK
perlboot.pod
294 B
Del
OK
perlbot.pod
304 B
Del
OK
perlbs2000.pod
7.81 KB
Del
OK
perlcall.pod
55.41 KB
Del
OK
perlcheat.pod
4.38 KB
Del
OK
perlclib.pod
9.38 KB
Del
OK
perlcn.pod
4.65 KB
Del
OK
perlcommunity.pod
6.82 KB
Del
OK
perlcygwin.pod
26.56 KB
Del
OK
perldata.pod
48.62 KB
Del
OK
perldbmfilter.pod
4.86 KB
Del
OK
perldebguts.pod
41.34 KB
Del
OK
perldebtut.pod
21.63 KB
Del
OK
perldebug.pod
38.46 KB
Del
OK
perldelta.pod
6.84 KB
Del
OK
perldeprecation.pod
20.34 KB
Del
OK
perldiag.pod
290.03 KB
Del
OK
perldos.pod
10.28 KB
Del
OK
perldsc.pod
25.01 KB
Del
OK
perldtrace.pod
7.77 KB
Del
OK
perlebcdic.pod
82.37 KB
Del
OK
perlembed.pod
36.69 KB
Del
OK
perlexperiment.pod
7.06 KB
Del
OK
perlfork.pod
13.04 KB
Del
OK
perlform.pod
16.22 KB
Del
OK
perlfreebsd.pod
1.58 KB
Del
OK
perlfunc.pod
394.31 KB
Del
OK
perlgit.pod
28.9 KB
Del
OK
perlgov.pod
14.14 KB
Del
OK
perlgpl.pod
13.49 KB
Del
OK
perlguts.pod
158.3 KB
Del
OK
perlhack.pod
42.15 KB
Del
OK
perlhacktips.pod
56.34 KB
Del
OK
perlhacktut.pod
6.01 KB
Del
OK
perlhaiku.pod
1.47 KB
Del
OK
perlhist.pod
54.85 KB
Del
OK
perlhpux.pod
29.89 KB
Del
OK
perlhurd.pod
1.95 KB
Del
OK
perlintern.pod
81.61 KB
Del
OK
perlinterp.pod
32.92 KB
Del
OK
perlintro.pod
21.62 KB
Del
OK
perliol.pod
33.99 KB
Del
OK
perlipc.pod
69.85 KB
Del
OK
perlirix.pod
4.31 KB
Del
OK
perljp.pod
8.23 KB
Del
OK
perlko.pod
11.92 KB
Del
OK
perllexwarn.pod
355 B
Del
OK
perllinux.pod
1.96 KB
Del
OK
perllocale.pod
72.38 KB
Del
OK
perllol.pod
9.36 KB
Del
OK
perlmacos.pod
998 B
Del
OK
perlmacosx.pod
11.84 KB
Del
OK
perlmod.pod
25.58 KB
Del
OK
perlmodinstall.pod
10.02 KB
Del
OK
perlmodlib.pod
74.56 KB
Del
OK
perlmodstyle.pod
22.06 KB
Del
OK
perlmroapi.pod
3.2 KB
Del
OK
perlnetware.pod
6.49 KB
Del
OK
perlnewmod.pod
10.78 KB
Del
OK
perlnumber.pod
8.16 KB
Del
OK
perlobj.pod
34.88 KB
Del
OK
perlootut.pod
26.13 KB
Del
OK
perlop.pod
145.4 KB
Del
OK
perlopenbsd.pod
1.2 KB
Del
OK
perlopentut.pod
14.87 KB
Del
OK
perlos2.pod
91.16 KB
Del
OK
perlos390.pod
16.14 KB
Del
OK
perlos400.pod
4.65 KB
Del
OK
perlpacktut.pod
50.17 KB
Del
OK
perlperf.pod
48.71 KB
Del
OK
perlplan9.pod
5 KB
Del
OK
perlpod.pod
22.54 KB
Del
OK
perlpodspec.pod
67.02 KB
Del
OK
perlpolicy.pod
25.94 KB
Del
OK
perlport.pod
86.61 KB
Del
OK
perlpragma.pod
5.05 KB
Del
OK
perlqnx.pod
6.52 KB
Del
OK
perlre.pod
127.75 KB
Del
OK
perlreapi.pod
29.54 KB
Del
OK
perlrebackslash.pod
31.53 KB
Del
OK
perlrecharclass.pod
48.54 KB
Del
OK
perlref.pod
34.6 KB
Del
OK
perlreftut.pod
18.38 KB
Del
OK
perlreguts.pod
38.38 KB
Del
OK
perlrepository.pod
509 B
Del
OK
perlrequick.pod
18.69 KB
Del
OK
perlreref.pod
15.22 KB
Del
OK
perlretut.pod
119.66 KB
Del
OK
perlriscos.pod
1.49 KB
Del
OK
perlrun.pod
54.67 KB
Del
OK
perlsec.pod
26.95 KB
Del
OK
perlsecpolicy.pod
18.99 KB
Del
OK
perlsolaris.pod
29.14 KB
Del
OK
perlsource.pod
6.96 KB
Del
OK
perlstyle.pod
8.53 KB
Del
OK
perlsub.pod
72.66 KB
Del
OK
perlsymbian.pod
14.98 KB
Del
OK
perlsyn.pod
44.08 KB
Del
OK
perlsynology.pod
7.77 KB
Del
OK
perlthrtut.pod
45.43 KB
Del
OK
perltie.pod
38.39 KB
Del
OK
perltoc.pod
685.35 KB
Del
OK
perltodo.pod
372 B
Del
OK
perltooc.pod
294 B
Del
OK
perltoot.pod
294 B
Del
OK
perltrap.pod
10.37 KB
Del
OK
perltru64.pod
8.29 KB
Del
OK
perltw.pod
4.36 KB
Del
OK
perlunicode.pod
89.21 KB
Del
OK
perlunicook.pod
25.06 KB
Del
OK
perlunifaq.pod
13.32 KB
Del
OK
perluniintro.pod
37.74 KB
Del
OK
perluniprops.pod
431.26 KB
Del
OK
perlunitut.pod
7.76 KB
Del
OK
perlutil.pod
7.12 KB
Del
OK
perlvar.pod
80.64 KB
Del
OK
perlvms.pod
49.63 KB
Del
OK
perlvos.pod
3.75 KB
Del
OK
perlwin32.pod
39.37 KB
Del
OK
Edit: perldtrace.pod
=head1 NAME perldtrace - Perl's support for DTrace =head1 SYNOPSIS # dtrace -Zn 'perl::sub-entry, perl::sub-return { trace(copyinstr(arg0)) }' dtrace: description 'perl::sub-entry, perl::sub-return ' matched 10 probes # perl -E 'sub outer { inner(@_) } sub inner { say shift } outer("hello")' hello (dtrace output) CPU ID FUNCTION:NAME 0 75915 Perl_pp_entersub:sub-entry BEGIN 0 75915 Perl_pp_entersub:sub-entry import 0 75922 Perl_pp_leavesub:sub-return import 0 75922 Perl_pp_leavesub:sub-return BEGIN 0 75915 Perl_pp_entersub:sub-entry outer 0 75915 Perl_pp_entersub:sub-entry inner 0 75922 Perl_pp_leavesub:sub-return inner 0 75922 Perl_pp_leavesub:sub-return outer =head1 DESCRIPTION DTrace is a framework for comprehensive system- and application-level tracing. Perl is a DTrace I<provider>, meaning it exposes several I<probes> for instrumentation. You can use these in conjunction with kernel-level probes, as well as probes from other providers such as MySQL, in order to diagnose software defects, or even just your application's bottlenecks. Perl must be compiled with the C<-Dusedtrace> option in order to make use of the provided probes. While DTrace aims to have no overhead when its instrumentation is not active, Perl's support itself cannot uphold that guarantee, so it is built without DTrace probes under most systems. One notable exception is that Mac OS X ships a F</usr/bin/perl> with DTrace support enabled. =head1 HISTORY =over 4 =item 5.10.1 Perl's initial DTrace support was added, providing C<sub-entry> and C<sub-return> probes. =item 5.14.0 The C<sub-entry> and C<sub-return> probes gain a fourth argument: the package name of the function. =item 5.16.0 The C<phase-change> probe was added. =item 5.18.0 The C<op-entry>, C<loading-file>, and C<loaded-file> probes were added. =back =head1 PROBES =over 4 =item sub-entry(SUBNAME, FILE, LINE, PACKAGE) Traces the entry of any subroutine. Note that all of the variables refer to the subroutine that is being invoked; there is currently no way to get ahold of any information about the subroutine's I<caller> from a DTrace action. :*perl*::sub-entry { printf("%s::%s entered at %s line %d\n", copyinstr(arg3), copyinstr(arg0), copyinstr(arg1), arg2); } =item sub-return(SUBNAME, FILE, LINE, PACKAGE) Traces the exit of any subroutine. Note that all of the variables refer to the subroutine that is returning; there is currently no way to get ahold of any information about the subroutine's I<caller> from a DTrace action. :*perl*::sub-return { printf("%s::%s returned at %s line %d\n", copyinstr(arg3), copyinstr(arg0), copyinstr(arg1), arg2); } =item phase-change(NEWPHASE, OLDPHASE) Traces changes to Perl's interpreter state. You can internalize this as tracing changes to Perl's C<${^GLOBAL_PHASE}> variable, especially since the values for C<NEWPHASE> and C<OLDPHASE> are the strings that C<${^GLOBAL_PHASE}> reports. :*perl*::phase-change { printf("Phase changed from %s to %s\n", copyinstr(arg1), copyinstr(arg0)); } =item op-entry(OPNAME) Traces the execution of each opcode in the Perl runloop. This probe is fired before the opcode is executed. When the Perl debugger is enabled, the DTrace probe is fired I<after> the debugger hooks (but still before the opcode itself is executed). :*perl*::op-entry { printf("About to execute opcode %s\n", copyinstr(arg0)); } =item loading-file(FILENAME) Fires when Perl is about to load an individual file, whether from C<use>, C<require>, or C<do>. This probe fires before the file is read from disk. The filename argument is converted to local filesystem paths instead of providing C<Module::Name>-style names. :*perl*:loading-file { printf("About to load %s\n", copyinstr(arg0)); } =item loaded-file(FILENAME) Fires when Perl has successfully loaded an individual file, whether from C<use>, C<require>, or C<do>. This probe fires after the file is read from disk and its contents evaluated. The filename argument is converted to local filesystem paths instead of providing C<Module::Name>-style names. :*perl*:loaded-file { printf("Successfully loaded %s\n", copyinstr(arg0)); } =back =head1 EXAMPLES =over 4 =item Most frequently called functions # dtrace -qZn 'sub-entry { @[strjoin(strjoin(copyinstr(arg3),"::"),copyinstr(arg0))] = count() } END {trunc(@, 10)}' Class::MOP::Attribute::slots 400 Try::Tiny::catch 411 Try::Tiny::try 411 Class::MOP::Instance::inline_slot_access 451 Class::MOP::Class::Immutable::Trait:::around 472 Class::MOP::Mixin::AttributeCore::has_initializer 496 Class::MOP::Method::Wrapped::__ANON__ 544 Class::MOP::Package::_package_stash 737 Class::MOP::Class::initialize 1128 Class::MOP::get_metaclass_by_name 1204 =item Trace function calls # dtrace -qFZn 'sub-entry, sub-return { trace(copyinstr(arg0)) }' 0 -> Perl_pp_entersub BEGIN 0 <- Perl_pp_leavesub BEGIN 0 -> Perl_pp_entersub BEGIN 0 -> Perl_pp_entersub import 0 <- Perl_pp_leavesub import 0 <- Perl_pp_leavesub BEGIN 0 -> Perl_pp_entersub BEGIN 0 -> Perl_pp_entersub dress 0 <- Perl_pp_leavesub dress 0 -> Perl_pp_entersub dirty 0 <- Perl_pp_leavesub dirty 0 -> Perl_pp_entersub whiten 0 <- Perl_pp_leavesub whiten 0 <- Perl_dounwind BEGIN =item Function calls during interpreter cleanup # dtrace -Zn 'phase-change /copyinstr(arg0) == "END"/ { self->ending = 1 } sub-entry /self->ending/ { trace(copyinstr(arg0)) }' CPU ID FUNCTION:NAME 1 77214 Perl_pp_entersub:sub-entry END 1 77214 Perl_pp_entersub:sub-entry END 1 77214 Perl_pp_entersub:sub-entry cleanup 1 77214 Perl_pp_entersub:sub-entry _force_writable 1 77214 Perl_pp_entersub:sub-entry _force_writable =item System calls at compile time # dtrace -qZn 'phase-change /copyinstr(arg0) == "START"/ { self->interesting = 1 } phase-change /copyinstr(arg0) == "RUN"/ { self->interesting = 0 } syscall::: /self->interesting/ { @[probefunc] = count() } END { trunc(@, 3) }' lseek 310 read 374 stat64 1056 =item Perl functions that execute the most opcodes # dtrace -qZn 'sub-entry { self->fqn = strjoin(copyinstr(arg3), strjoin("::", copyinstr(arg0))) } op-entry /self->fqn != ""/ { @[self->fqn] = count() } END { trunc(@, 3) }' warnings::unimport 4589 Exporter::Heavy::_rebuild_cache 5039 Exporter::import 14578 =back =head1 REFERENCES =over 4 =item DTrace Dynamic Tracing Guide L<http://dtrace.org/guide/preface.html> =item DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X and FreeBSD L<https://www.amazon.com/DTrace-Dynamic-Tracing-Solaris-FreeBSD/dp/0132091518/> =back =head1 SEE ALSO =over 4 =item L<Devel::DTrace::Provider> This CPAN module lets you create application-level DTrace probes written in Perl. =back =head1 AUTHORS Shawn M Moore C<sartak@gmail.com> =cut
Save