[Python-Dev] profiler hooks (original) (raw)

Samuele Pedroni pedroni@inf.ethz.ch
Fri, 12 Oct 2001 22:16:16 +0200


For those who aren't already aware of it, I've been working on a new profiler for Python, implemented in C. It includes features that will allow per-line profiling if desired. I should have the implementation checked in shortly. One thing that I'd like to change is the way the profiler/tracer are dispatched from the main eval loop. The changes are easy enough, but I can simplify things further if we don't need to support both a profiler and tracer simultaneously. (The trace hook is used by sys.settrace(), needed for the debugger and 3rd-party coverage tools; the profile hook is used for (you guessed it!) the profiler, via sys.setprofile().)

Will your changes propagate to changes to pdb etc? because in that case they will need to be ported to jython, that actually supports both tracers (pdb ) and profilers (profile ).

regards.