diff options
author | Fred Drake <fdrake@acm.org> | 2001-06-27 19:18:03 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-06-27 19:18:03 (GMT) |
commit | 55fb6e037170ddb645c552079ec8fe6c042de542 (patch) | |
tree | 02f1e8fb2e7fef02acc5b2a5f7fa7241dcf0fe9c /Include/ceval.h | |
parent | 8f4558583f3b7e2d98e13baec06c2f43c9e6a723 (diff) | |
download | cpython-55fb6e037170ddb645c552079ec8fe6c042de542.zip cpython-55fb6e037170ddb645c552079ec8fe6c042de542.tar.gz cpython-55fb6e037170ddb645c552079ec8fe6c042de542.tar.bz2 |
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.
Diffstat (limited to 'Include/ceval.h')
-rw-r--r-- | Include/ceval.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/ceval.h b/Include/ceval.h index 4e6889e..19ac064 100644 --- a/Include/ceval.h +++ b/Include/ceval.h @@ -22,6 +22,9 @@ DL_IMPORT(PyObject *) PyEval_CallFunction(PyObject *obj, char *format, ...); DL_IMPORT(PyObject *) PyEval_CallMethod(PyObject *obj, char *methodname, char *format, ...); +DL_IMPORT(void) PyEval_SetProfile(Py_tracefunc, PyObject *); +DL_IMPORT(void) PyEval_SetTrace(Py_tracefunc, PyObject *); + DL_IMPORT(PyObject *) PyEval_GetBuiltins(void); DL_IMPORT(PyObject *) PyEval_GetGlobals(void); DL_IMPORT(PyObject *) PyEval_GetLocals(void); |