Profiling Python using gprof

jepler at unpythonic.net jepler at unpythonic.net
Tue Oct 11 21:59:49 EDT 2005


It should be the same as for any program....

$ program-compiled-with-pg
$ gprof /path/to/program-compiled-with-pg

you'll need to make sure that python is not only *compiled* with -pg
but that the *link line* contains -pg as well.  That's a common "gotcha" when
it comes to profiling.

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20051011/badcc37c/attachment.sig>


More information about the Python-list mailing list