Alan Burlison wrote:
> I'd be more than happy to do it in a module, but I'm not clear how I 
> would replace functions in libperl from a module.

Your module could, for example, replace the op_ppaddr fields of the
ops you want to intrument with your own DTrace-enabled implementation.

(I note that every op has an op_ppaddr field, which is probably some
memory overhead. However that also means that you can instrument only
part of the optree)

Or your module can replace the runloop and provide alternate
implementations directly in it for the ops you want to instrument.

> The whole point of 
> dtrace is that it is lightweight enough to leave it in the code all the 
> time.  Loading an additional module normally requires that you 
> stop/start the application, embedding the probes would mean you could 
> enable the probes on the fly.

That's a significant point for enabling DTrace at compile time in perl.

Reply via email to