diff options
author | Shawn M Moore <code@sartak.org> | 2012-08-24 10:35:08 +0200 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-08-28 07:13:44 -0700 |
commit | fe83c362fb182e46bac02c1bd1cf0b8d82c9f1bf (patch) | |
tree | 9d7da5e5a98ef9a21b90f1067f175b54145e3de6 /pod/perldtrace.pod | |
parent | 9e7f031c1856270daeb95d2b6db9817469855476 (diff) | |
download | perl-fe83c362fb182e46bac02c1bd1cf0b8d82c9f1bf.tar.gz |
"op-entry" DTrace probe
Diffstat (limited to 'pod/perldtrace.pod')
-rw-r--r-- | pod/perldtrace.pod | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/pod/perldtrace.pod b/pod/perldtrace.pod index 39551e1749..60a93705a4 100644 --- a/pod/perldtrace.pod +++ b/pod/perldtrace.pod @@ -55,6 +55,10 @@ package name of the function. The C<phase-change> probe was added. +=item 5.18.0 + +The C<op-entry> probe was added. + =back =head1 PROBES @@ -97,6 +101,17 @@ C<${^GLOBAL_PHASE}> reports. 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)); + } + =back =head1 EXAMPLES @@ -156,6 +171,14 @@ C<${^GLOBAL_PHASE}> reports. 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 @@ -172,6 +195,16 @@ L<http://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> |