[Python-Dev] Hotshot

Fred L. Drake, Jr. fdrake at acm.org
Fri Jan 23 18:34:37 EST 2004

Nick Bastin writes:
 > There was some note in a presentation you gave quite a while ago that 
 > HotShot could profile C extension functions, but I believe that would 
 > have required a change to the main python interpreter loop.  Does it 

It would have required an interpreter change which, I believe, was
never made.  There may be a patch for this on SourceForge; I don't
remember.  You can search the patch and bug trackers for "hotshot" to
see what's there; I afraid I don't remember the specific changes that
were involved.

The mechanism discussed at the time would have allowed measuring the
time spent in calls to PyCFunction objects (extension functions), but
would not have provided per-line information for those functions.  The
goals was as much to subtract the time spent in C code from the time
allocated to the Python function itself more than to actually provide
measurement of the C function itself (though some information falls
out of that naturally).


Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation

More information about the Python-Dev mailing list