develooper Front page | perl.perl5.porters | Postings from July 2009

Re: dtrace support

Thread Previous | Thread Next
Andy Armstrong
July 20, 2009 05:37
Re: dtrace support
Message ID:
On 18 Jul 2009, at 22:46, Dave Mitchell wrote:
> I know a bit after 5.10.0, that some effort was put into adding some
> DTRace support to perl. Does anyone understand what was actually  
> added,
> and if so, could you you write a brief paragrah for inclusion in
> perldelta?

=head2 DTrace support

On platforms where DTrace is available it may be enabled by configuring
perl with -Dusedtrace. DTrace probes are available for subroutine entry
(sub-entry) and subroutine exit (sub-exit). Here's a simple D script
that uses them:

   perl$target:::sub-entry, perl$target:::sub-return {
     printf("%s %s (%s:%d)\n", probename == "sub-entry" ? "->" : "<-",
               copyinstr(arg0), copyinstr(arg1), arg2);

Andy Armstrong, Hexten

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About