Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 43f1b8d

Browse files
committed
Added optional interface for dynamic execution profile (to be gathered
in ceval.c).
1 parent b3f515a commit 43f1b8d

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

Python/sysmodule.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,21 +194,30 @@ sys_getcounts(self, args)
194194
extern PyObject *_Py_GetObjects Py_PROTO((PyObject *, PyObject *));
195195
#endif
196196

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+
197202
static struct methodlist sys_methods[] = {
203+
/* Might as well keep this in alphabetic order */
198204
{"exit", sys_exit, 0},
199-
{"getrefcount", sys_getrefcount, 0},
200205
#ifdef COUNT_ALLOCS
201206
{"getcounts", sys_getcounts, 0},
202207
#endif
208+
#ifdef DYNAMIC_EXECUTION_PROFILE
209+
{"getdxp", _Py_GetDXProfile, 1},
210+
#endif
203211
#ifdef Py_TRACE_REFS
204212
{"getobjects", _Py_GetObjects, 1},
205213
#endif
214+
{"getrefcount", sys_getrefcount, 0},
206215
#ifdef USE_MALLOPT
207216
{"mdebug", sys_mdebug, 0},
208217
#endif
218+
{"setcheckinterval", sys_setcheckinterval, 1},
209219
{"setprofile", sys_setprofile, 0},
210220
{"settrace", sys_settrace, 0},
211-
{"setcheckinterval", sys_setcheckinterval, 1},
212221
{NULL, NULL} /* sentinel */
213222
};
214223

0 commit comments

Comments
 (0)