I hope I'm not stealing AndyA's thunder, but this just went by on p5p and I'm excited!
dtrace is Sun's new thing to allow you to do live tracing of function calls across the entire operating system without having to compile without any special flags and without a performance hit when you're not actively doing a trace. It's been ported to FreeBSD and OS X 10.5.From: Andy Armstrong <andy@hexten.net>
I now have a dtraced bleadperl which runs no slower than the clean
version:
orig | dtrace | ratio
====================================
2.51239896 | 2.47904992 | 0.98672622
2.50696611 | 2.46995783 | 0.98523782
2.52996778 | 2.47554016 | 0.97848683
2.50457382 | 2.47788405 | 0.98934359
2.50622296 | 2.46893001 | 0.98511986
In fact in those tests the dtraced version is running marginally
faster. I'm putting that down to a happy code alignment or somesuch.