Mercurial > cpython-lru_cache-weakref
comparison Python/sysmodule.c @ 5047:7a9cac7cb910 legacy-trunk
Added optional interface for dynamic execution profile (to be gathered
in ceval.c).
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 24 Jan 1997 04:07:45 +0000 |
| parents | 5dc20a9e0506 |
| children | db673e98f28d |
comparison
equal
deleted
inserted
replaced
| 5046:658815230546 | 5047:7a9cac7cb910 |
|---|---|
| 192 #ifdef Py_TRACE_REFS | 192 #ifdef Py_TRACE_REFS |
| 193 /* Defined in objects.c because it uses static globals if that file */ | 193 /* Defined in objects.c because it uses static globals if that file */ |
| 194 extern PyObject *_Py_GetObjects Py_PROTO((PyObject *, PyObject *)); | 194 extern PyObject *_Py_GetObjects Py_PROTO((PyObject *, PyObject *)); |
| 195 #endif | 195 #endif |
| 196 | 196 |
| 197 #ifdef DYNAMIC_EXECUTION_PROFILE | |
| 198 /* Defined in ceval.c because it uses static globals if that file */ | |
| 199 extern PyObject *_Py_GetDXProfile Py_PROTO((PyObject *, PyObject *)); | |
| 200 #endif | |
| 201 | |
| 197 static struct methodlist sys_methods[] = { | 202 static struct methodlist sys_methods[] = { |
| 203 /* Might as well keep this in alphabetic order */ | |
| 198 {"exit", sys_exit, 0}, | 204 {"exit", sys_exit, 0}, |
| 199 {"getrefcount", sys_getrefcount, 0}, | |
| 200 #ifdef COUNT_ALLOCS | 205 #ifdef COUNT_ALLOCS |
| 201 {"getcounts", sys_getcounts, 0}, | 206 {"getcounts", sys_getcounts, 0}, |
| 202 #endif | 207 #endif |
| 208 #ifdef DYNAMIC_EXECUTION_PROFILE | |
| 209 {"getdxp", _Py_GetDXProfile, 1}, | |
| 210 #endif | |
| 203 #ifdef Py_TRACE_REFS | 211 #ifdef Py_TRACE_REFS |
| 204 {"getobjects", _Py_GetObjects, 1}, | 212 {"getobjects", _Py_GetObjects, 1}, |
| 205 #endif | 213 #endif |
| 214 {"getrefcount", sys_getrefcount, 0}, | |
| 206 #ifdef USE_MALLOPT | 215 #ifdef USE_MALLOPT |
| 207 {"mdebug", sys_mdebug, 0}, | 216 {"mdebug", sys_mdebug, 0}, |
| 208 #endif | 217 #endif |
| 218 {"setcheckinterval", sys_setcheckinterval, 1}, | |
| 209 {"setprofile", sys_setprofile, 0}, | 219 {"setprofile", sys_setprofile, 0}, |
| 210 {"settrace", sys_settrace, 0}, | 220 {"settrace", sys_settrace, 0}, |
| 211 {"setcheckinterval", sys_setcheckinterval, 1}, | |
| 212 {NULL, NULL} /* sentinel */ | 221 {NULL, NULL} /* sentinel */ |
| 213 }; | 222 }; |
| 214 | 223 |
| 215 static object *sysin, *sysout, *syserr; | 224 static object *sysin, *sysout, *syserr; |
| 216 | 225 |
