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.
What is the best way to sample/profile a PyObjC application?
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/
The above links are broken, but I found the same content here: tech.marshallfamily.com.au/archives/… and tech.marshallfamily.com.au/archives/… –
Flagship
© 2022 - 2024 — McMap. All rights reserved.