develooper Front page | perl.perl5.porters | Postings from January 2008

Re: dtrace and Perl (again)

Thread Previous | Thread Next
Andy Armstrong
January 6, 2008 08:17
Re: dtrace and Perl (again)
Message ID:
On 5 Jan 2008, at 19:10, Andy Armstrong wrote:
> I took Richard Dawe's patch[1] (mentioned in the above post) and  
> applied it to blead on Mac OS. It works fine. Actually dtrace seems  
> to have changed slightly since Richard produced his patch with the  
> result that it's now slightly less involved: you don't have to  
> create an extra object file to link against.

I've taken a slight digression (won't somebody *please* think of the  
yaks...) and released Devel::DTrace[1] which implements dtrace probes  
in a replacement runops loop. It's not perfect - you have to have  
loaded the module before dtrace can attach itself - but it'd be useful  
in the case of long running Perl processes.

For version 0.02 I'm going to have it build a custom interpreter that  
hooks the instrumented runops loop in at startup. So you'll end up  
with a dtperl alongside your regular perl. If that approach works out  
I'm not sure there's any need for dtrace in core. In any event you'd  
probably want to build a custom perl to enable dtrace - and this  
approach is going to give roughly equivalent results /and/ be much  
easier to install.

As ever, thoughts welcome.


Andy Armstrong, Hexten

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