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

Re: dtrace and Perl (again)

Thread Previous | Thread Next
Nicholas Clark
January 7, 2008 15:16
Re: dtrace and Perl (again)
Message ID:
On Mon, Jan 07, 2008 at 10:39:43PM +0000, Andy Armstrong wrote:
> On 6 Jan 2008, at 16:28, Nicholas Clark wrote:
> >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. 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)
> I now have a dtraced bleadperl which runs no slower than the clean  
> version:

> I could use a little advice about how dtrace should be detected by  
> Configure and handled at build time. I need to
> * find the dtrace executable
> * use it to filter a D script into a .h
> * (on Solaris but not MacOS) filter a D script into a .o
> * link against the generated .o
> I assume that all the above should be conditional on -Dusedtrace and  
> that Apple and Sun will set that option when they build their vendor  
> versions. Is that sensible?

No! :-)

Only in that if it's the same speed, I don't see why we don't default to
building it in on any platform where we can, and let the user have to do
-Uusedtrace if they don't want it.

> Is there a precedent for finding an executable? Anything else I should  
> be thinking about?

I can't spot anything in generic Configure that is searching for executables.
But I would assume that if it's in PATH, it's there. Else the user needs to
re-run with a better PATH set up.

Nicholas Clark

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