php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /opt/lampp/share/man/man1/ |
files >> //opt/lampp/share/man/man1/perldtrace.1 |
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.20) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "PERLDTRACE 1" .TH PERLDTRACE 1 "2013-03-04" "perl v5.16.3" "Perl Programmers Reference Guide" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" perldtrace \- Perl's support for DTrace .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& # dtrace \-Zn \*(Aqperl::sub\-entry, perl::sub\-return { trace(copyinstr(arg0)) }\*(Aq \& dtrace: description \*(Aqperl::sub\-entry, perl::sub\-return \*(Aq matched 10 probes \& \& # perl \-E \*(Aqsub outer { inner(@_) } sub inner { say shift } outer("hello")\*(Aq \& 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 .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" DTrace is a framework for comprehensive system\- and application-level tracing. Perl is a DTrace \fIprovider\fR, meaning it exposes several \&\fIprobes\fR 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. .PP Perl must be compiled with the \f(CW\*(C`\-Dusedtrace\*(C'\fR 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 \s-1OS\s0 X ships a \fI/usr/bin/perl\fR with DTrace support enabled. .SH "HISTORY" .IX Header "HISTORY" .IP "5.10.1" 4 .IX Item "5.10.1" Perl's initial DTrace support was added, providing \f(CW\*(C`sub\-entry\*(C'\fR and \&\f(CW\*(C`sub\-return\*(C'\fR probes. .IP "5.14.0" 4 .IX Item "5.14.0" The \f(CW\*(C`sub\-entry\*(C'\fR and \f(CW\*(C`sub\-return\*(C'\fR probes gain a fourth argument: the package name of the function. .IP "5.16.0" 4 .IX Item "5.16.0" The \f(CW\*(C`phase\-change\*(C'\fR probe was added. .SH "PROBES" .IX Header "PROBES" .IP "sub\-entry(\s-1SUBNAME\s0, \s-1FILE\s0, \s-1LINE\s0, \s-1PACKAGE\s0)" 4 .IX 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 \&\fIcaller\fR from a DTrace action. .Sp .Vb 4 \& :*perl*::sub\-entry { \& printf("%s::%s entered at %s line %d\en", \& copyinstr(arg3), copyinstr(arg0), copyinstr(arg1), arg0); \& } .Ve .IP "sub\-return(\s-1SUBNAME\s0, \s-1FILE\s0, \s-1LINE\s0, \s-1PACKAGE\s0)" 4 .IX 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 \fIcaller\fR from a DTrace action. .Sp .Vb 4 \& :*perl*::sub\-return { \& printf("%s::%s returned at %s line %d\en", \& copyinstr(arg3), copyinstr(arg0), copyinstr(arg1), arg0); \& } .Ve .IP "phase\-change(\s-1NEWPHASE\s0, \s-1OLDPHASE\s0)" 4 .IX Item "phase-change(NEWPHASE, OLDPHASE)" Traces changes to Perl's interpreter state. You can internalize this as tracing changes to Perl's \f(CW\*(C`${^GLOBAL_PHASE}\*(C'\fR variable, especially since the values for \f(CW\*(C`NEWPHASE\*(C'\fR and \f(CW\*(C`OLDPHASE\*(C'\fR are the strings that \&\f(CW\*(C`${^GLOBAL_PHASE}\*(C'\fR reports. .Sp .Vb 4 \& :*perl*::phase\-change { \& printf("Phase changed from %s to %s\en", \& copyinstr(arg1), copyinstr(arg0)); \& } .Ve .SH "EXAMPLES" .IX Header "EXAMPLES" .IP "Most frequently called functions" 4 .IX Item "Most frequently called functions" .Vb 1 \& # dtrace \-qZn \*(Aqsub\-entry { @[strjoin(strjoin(copyinstr(arg3),"::"),copyinstr(arg0))] = count() } END {trunc(@, 10)}\*(Aq \& \& 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 .Ve .IP "Trace function calls" 4 .IX Item "Trace function calls" .Vb 1 \& # dtrace \-qFZn \*(Aqsub\-entry, sub\-return { trace(copyinstr(arg0)) }\*(Aq \& \& 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 .Ve .IP "Function calls during interpreter cleanup" 4 .IX Item "Function calls during interpreter cleanup" .Vb 1 \& # dtrace \-Zn \*(Aqphase\-change /copyinstr(arg0) == "END"/ { self\->ending = 1 } sub\-entry /self\->ending/ { trace(copyinstr(arg0)) }\*(Aq \& \& 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 .Ve .IP "System calls at compile time" 4 .IX Item "System calls at compile time" .Vb 1 \& # dtrace \-qZn \*(Aqphase\-change /copyinstr(arg0) == "START"/ { self\->interesting = 1 } phase\-change /copyinstr(arg0) == "RUN"/ { self\->interesting = 0 } syscall::: /self\->interesting/ { @[probefunc] = count() } END { trunc(@, 3) }\*(Aq \& \& lseek 310 \& read 374 \& stat64 1056 .Ve .SH "REFERENCES" .IX Header "REFERENCES" .IP "DTrace User Guide" 4 .IX Item "DTrace User Guide" http://download.oracle.com/docs/cd/E19082\-01/819\-3620/index.html <http://download.oracle.com/docs/cd/E19082-01/819-3620/index.html> .IP "DTrace: Dynamic Tracing in Oracle Solaris, Mac \s-1OS\s0 X and FreeBSD" 4 .IX Item "DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X and FreeBSD" http://www.amazon.com/DTrace\-Dynamic\-Tracing\-Solaris\-FreeBSD/dp/0132091518/ <http://www.amazon.com/DTrace-Dynamic-Tracing-Solaris-FreeBSD/dp/0132091518/> .SH "AUTHORS" .IX Header "AUTHORS" Shawn M Moore \f(CW\*(C`sartak@gmail.com\*(C'\fRy~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`