Provides a minimal strace/truss-like utility for
Perl scripts. Using
Devel::RingBuffer, each new subroutine call is logged to an mmap'ed shared memory
region (as provided by IPC::Mmap).
As each statement is executed, the line number and Time::HiRes:;time() timestamp
are written to the current ringbuffer slot. An external application can
then monitor a running application by inspecting the mmap'ed area (see
and the associated plstrace.pl application for an example).
Permission is granted to use this software under the same terms as Perl itself.
Refer to the Perl Artistic License
- D. Arnold
- See Also:
Unless otherwise noted,
is the object instance variable.
(class method) Threads clone method
(class method) Debug a single statement
(class method) Debug a subroutine call
- (class method) Threads clone method. Allocates a new ring, and
and populates the existing cloned ring object with
the newly allocate ring information.
- (class method) Debug a single statement. Creates a ringbuffer if none exists.
Allocates a new ring if executed in a new process. Updates
the ring's current slot with the current line number and timestamp.
- (class method) Debug a subroutine call. If trace is enabled
in the ring, the next slot is allocated and the called
subroutine (from $DB::sub) is written to it. The subroutine
is then called with the caller's return context, and then
the slot is freed before returning. Note that this method
requires additional control to handle re-entrancy when
DB::DB() or DB::sub() make calls to the various support
- The subroutine's return value(s), if the
caller is not in void context.
Generated by psichedoc on Sun Aug 13 09:26:08 2006