profiling a C++ python extension

Emin.shopper Martinian.shopper emin.shopper at gmail.com
Wed Jul 11 11:26:39 EDT 2007


Googling for "profiling python extensions" leads to the following link which
worked for me a while ago:
http://plexity.blogspot.com/2006/02/profiling-python-extensions.html

On 7/10/07, rasmus <matt.rasmus at gmail.com> wrote:
>
> I have used gprof to profile stand alone C++ programs.  I am also
> aware of pure python profilers.  However, is there a way to get
> profile information on my C++ functions when they are compiled in a
> shared library (python extension module) and called from python.  From
> what I can tell, gmon.out will not be generated unless the entire
> executable (python interpreter) was compiled with -pg.  Is my only
> solution to recompile the python interpreter with -pg so that my
> extension module (also compiled with -pg) produces a gmon.out?
>
> Any suggestions or tips would be helpful.
>
> Matt
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070711/da2eb9f3/attachment.html>


More information about the Python-list mailing list