]> granicus.if.org Git - python/commit
Revise the interface to the profiling and tracing support for the
authorFred Drake <fdrake@acm.org>
Wed, 27 Jun 2001 19:18:03 +0000 (19:18 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 27 Jun 2001 19:18:03 +0000 (19:18 +0000)
commit55fb6e037170ddb645c552079ec8fe6c042de542
tree02f1e8fb2e7fef02acc5b2a5f7fa7241dcf0fe9c
parent8f4558583f3b7e2d98e13baec06c2f43c9e6a723
Revise the interface to the profiling and tracing support for the
Python interpreter.

This change adds two new C-level APIs:  PyEval_SetProfile() and
PyEval_SetTrace().  These can be used to install profile and trace
functions implemented in C, which can operate at much higher speeds
than Python-based functions.  The overhead for calling a C-based
profile function is a very small fraction of a percent of the overhead
involved in calling a Python-based function.

The machinery required to call a Python-based profile or trace
function been moved to sysmodule.c, where sys.setprofile() and
sys.setprofile() simply become users of the new interface.
Include/ceval.h
Include/pystate.h