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

1

6

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.

Trevino answered 1/10, 2008 at 13:45 Comment(0)
L
2

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/

Lineberry answered 3/10, 2008 at 3:33 Comment(1)
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.