http://www.perlmonks.org?node_id=356611


in reply to Dreaming of a Better Profiler

Even though it was designed for audio work, JACK will provide you with a real-time framework that has low-latency interrupts. Use it with a low-latency linux kernel.

I've used it for C++ profiling, it works great. You could use the same technique with perl.

Since I'm a hardware guy, I flip a bit on the parallel port at the entrance and the exit of the process, and watch the duty cycle of the waveform with an oscilloscope. You could use a cheap voltmeter to do the same trick, just add a resistor and capacitor to convert the pulse widths into a DC voltage.

It should work perfectly the first time! - toma