Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to sample/profile a PyObjC application?

Sampling with Activity Monitor/Instruments/Shark will show stack traces full of C functions for the Python interpreter. I would be helpful to see the corresponding Python symbol names. Is there some DTrace magic that can do that? Python's cProfile module can be useful for profiling individual subtrees of Python calls, but not so much for getting a picture of what's going on with the whole application in response to user events.

like image 835
Michael Tsai Avatar asked Oct 01 '08 13:10

Michael Tsai


1 Answers

The answer is "dtrace", but it won't work on sufficiently old macs.

http://tech.marshallfamily.com.au/archives/python-dtrace-on-os-x-leopard-part-1/

http://tech.marshallfamily.com.au/archives/python-dtrace-on-os-x-leopard-part-2/

like image 143
wnoise Avatar answered Oct 06 '22 16:10

wnoise