Profiling extensions

Greg Landrum drgergl at mindspring.com
Sat Mar 2 10:02:41 EST 2002


[Linux, python 2.1]
Hi All,


I've got a Boostified C++ class that I'm using from Python.  The class
supports pickling, but restoring things from pickles seems to be really,
really slow.  I figured that I'd profile the code and find out where the
time is being spent, but I ran into a wall.

I built both my extension modules and python itself with -pg.  Running a
test case and looking at the gprof output only shows me numbers for the
python interpreter itself.  This is none too edifying.

So, my question is: is there any way to trick gprof (or prof, I don't much
care) into gathering data for the extension modules as well as the
interpreter?

Thanks,
-greg






More information about the Python-list mailing list