mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
Add more stats for freelist use and allocations. (GH-92211)
This commit is contained in:
parent
e8d7661ff2
commit
836b17c9c3
9 changed files with 43 additions and 0 deletions
|
@ -1195,6 +1195,7 @@ maybe_freelist_pop(Py_ssize_t size)
|
|||
#endif
|
||||
_Py_NewReference((PyObject *)op);
|
||||
/* END inlined _PyObject_InitVar() */
|
||||
OBJECT_STAT_INC(from_freelist);
|
||||
return op;
|
||||
}
|
||||
}
|
||||
|
@ -1224,6 +1225,7 @@ maybe_freelist_push(PyTupleObject *op)
|
|||
op->ob_item[0] = (PyObject *) STATE.free_list[index];
|
||||
STATE.free_list[index] = op;
|
||||
STATE.numfree[index]++;
|
||||
OBJECT_STAT_INC(to_freelist);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue