Can you use gprof to profile python extensions?

Konrad Hinsen hinsen at cnrs-orleans.fr
Wed Aug 9 14:18:56 EDT 2000


Alex <cut_me_out at hotmail.com> writes:

> Hi.  I'd like to profile an extension I've written, and I'm having some
> trouble doing it.  The extension is statically linked into python
> (version 2.0), and I recompiled python with OPT= -g -pg
> However, running python does not produce a file called gmon.out.  Is it
> possible to use gprof with python, and if so, does anyone have a
> suggestion about what I might be doing wrong?

I have done this many times without any problem. Did you make sure that
you also use -pg during the final linking step? I think OPT=... doesn't
do this automatically.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen at cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------



More information about the Python-list mailing list