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

Re: dtrace and Perl (again)

Thread Previous | Thread Next
Andy Armstrong
January 9, 2008 05:43
Re: dtrace and Perl (again)
Message ID:
On 9 Jan 2008, at 13:22, Andy Dougherty wrote:
> Anyway, there's also apparently the issue that not all 'dtrace's are
> equivalent.  I don't know if there are "new" and "old" versions, but  
> there
> are apparently at least two flavors.
> In short, if possible, actually testing whether 'dtrace' works before
> using it makes sense, if that testing can be done without too much  
> pain.

I'm now getting a lot of help from the Sun people including a shell  
account on a Solaris box to test against. They've said I can have  
access to pretty much any dtrace enabled Solaris I need.

So I'm hopeful that with their help I can navigate the minefield of  
dtrace versions.

As far as I can see the dtrace executable is always called /usr/sbin/ 
dtrace. Certainly that's the standard location on both Solaris and Mac  
OS. If FreeBSD ends up with it somewhere else we can probably just  
hard wire that too. I think I'd rather go with a hard wired location  
and have it fail safely than just poke around looking for any dtrace  
on the path and risk collateral damage.

>> But how about something like -Dusedtrace=/path/to/dtrace if the user
>> wants to specify it, but have it default to the known location of  
>> dtrace
>> as installed by their OS vendor otherwise?
> Yes, something like that is what I had in mind.  (I'll, of course,  
> need to
> find out what those "known locations" are, but that's a detail to be
> filled in later.)  The ability to override with a command line  
> option is a
> general feature of nearly all Configure variables, so that comes  
> along for
> free.

Yup, good plan. So I think /usr/sbin/dtrace -or- whatever the user  
specifies is the way forward right now.

> My idea is this:  First, honor a command line.  Next, look in known
> locations for the particular operating system.  Finally, look in  
> $PATH.

I'd skip PATH on the basis of the understanding I have right now.

Andy Armstrong, Hexten

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