diff options
author | Guido van Rossum <guido@python.org> | 1997-01-24 04:07:45 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-01-24 04:07:45 (GMT) |
commit | 43f1b8d6e4813f171d74c3c5e2c495e041afabef (patch) | |
tree | eb19d1a1bf1d171b70fc207dfc91af2b770e5682 /Python | |
parent | b3f515af646abf590f57fc6fe0da9eedfbbbb367 (diff) | |
download | cpython-43f1b8d6e4813f171d74c3c5e2c495e041afabef.zip cpython-43f1b8d6e4813f171d74c3c5e2c495e041afabef.tar.gz cpython-43f1b8d6e4813f171d74c3c5e2c495e041afabef.tar.bz2 |
Added optional interface for dynamic execution profile (to be gathered
in ceval.c).
Diffstat (limited to 'Python')
-rw-r--r-- | Python/sysmodule.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 568f45a..c1eaeed 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -194,21 +194,30 @@ sys_getcounts(self, args) extern PyObject *_Py_GetObjects Py_PROTO((PyObject *, PyObject *)); #endif +#ifdef DYNAMIC_EXECUTION_PROFILE +/* Defined in ceval.c because it uses static globals if that file */ +extern PyObject *_Py_GetDXProfile Py_PROTO((PyObject *, PyObject *)); +#endif + static struct methodlist sys_methods[] = { + /* Might as well keep this in alphabetic order */ {"exit", sys_exit, 0}, - {"getrefcount", sys_getrefcount, 0}, #ifdef COUNT_ALLOCS {"getcounts", sys_getcounts, 0}, #endif +#ifdef DYNAMIC_EXECUTION_PROFILE + {"getdxp", _Py_GetDXProfile, 1}, +#endif #ifdef Py_TRACE_REFS {"getobjects", _Py_GetObjects, 1}, #endif + {"getrefcount", sys_getrefcount, 0}, #ifdef USE_MALLOPT {"mdebug", sys_mdebug, 0}, #endif + {"setcheckinterval", sys_setcheckinterval, 1}, {"setprofile", sys_setprofile, 0}, {"settrace", sys_settrace, 0}, - {"setcheckinterval", sys_setcheckinterval, 1}, {NULL, NULL} /* sentinel */ }; |