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

Re: dtrace and Perl (again)

Thread Previous | Thread Next
From:
Andy Armstrong
Date:
January 6, 2008 08:32
Subject:
Re: dtrace and Perl (again)
Message ID:
430B4B99-D4FB-46DC-B8D3-1A992665D5C1@hexten.net
On 6 Jan 2008, at 16:28, Nicholas Clark wrote:
>> 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.
>
> It's great that it's possible to "upgrade" an existing perl to be  
> dtrace
> enabled.
>
> However, the counter argument is that if it is possible to get the C  
> code that
> is currently a speed hit re-implemented in D, then there is no speed  
> hit in
> having every perl dtrace enabled.

I haven't abandoned that approach. The problem is that it seems that  
CopLINE and CopFILE have definitions that depend in fairly involved  
ways on how Perl is being built. That's the functionality that would  
have to be implemented in a dtrace shim.

Also it's always going to make subroutine entry and exit /slight/  
slower just because there will be a couple of nopped-out instructions  
in there. I'm not sure if that's a concern or not.

> Which seems like a much better thing long
> term, as it would mean that any user of Perl on Solaris, FreeBSD, OS  
> X, etc
> would be able to use dtrace instrumentation immediately, and on  
> running
> processes, even if they don't have the permission to install modules  
> from
> CPAN. (Heck, they don't even have to be aware of modules on CPAN)


Yeah, sure. Well if I can make it essentially free there'll be a patch  
at some point.

-- 
Andy Armstrong, Hexten





Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About