mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #26588: add debug traces
Try to debug random failure on buildbots.
This commit is contained in:
parent
24f949e10c
commit
84aab09421
3 changed files with 59 additions and 5 deletions
|
@ -3747,6 +3747,19 @@ tracemalloc_get_traceback(PyObject *self, PyObject *args)
|
|||
return _PyTraceMalloc_GetTraceback(domain, (Py_uintptr_t)ptr);
|
||||
}
|
||||
|
||||
PyObject*
|
||||
tracemalloc_set_debug(PyObject *self, PyObject *args)
|
||||
{
|
||||
int debug;
|
||||
extern int tracemalloc_debug;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "i", &debug))
|
||||
return NULL;
|
||||
|
||||
tracemalloc_debug = debug;
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
||||
static PyMethodDef TestMethods[] = {
|
||||
{"raise_exception", raise_exception, METH_VARARGS},
|
||||
|
@ -3936,6 +3949,7 @@ static PyMethodDef TestMethods[] = {
|
|||
{"tracemalloc_track", tracemalloc_track, METH_VARARGS},
|
||||
{"tracemalloc_untrack", tracemalloc_untrack, METH_VARARGS},
|
||||
{"tracemalloc_get_traceback", tracemalloc_get_traceback, METH_VARARGS},
|
||||
{"tracemalloc_set_debug", tracemalloc_set_debug, METH_VARARGS},
|
||||
{NULL, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue