Valued Lessons: How to DTrace Python in OSX:
"So, here's how you use dtrace on your python application in Mac OSX:
1. Get DTraceToolkit.
2. Edit Python/py_cputime.d by replacing 'function-entry' with 'entry' and 'function-return' with 'exit'.
3. Call 'sudo dtrace -s Python/py_cputime.d'
4. Let it sit there a while and hit ctrl-c.
5. Enjoy the results"