Profiling Python using gprof

jepler at unpythonic.net jepler at unpythonic.net
Wed Oct 12 03:59:49 CEST 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.pgp>


More information about the Python-list mailing list