mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-39489: Remove COUNT_ALLOCS special build (GH-18259)
Remove: * COUNT_ALLOCS macro * sys.getcounts() function * SHOW_ALLOC_COUNT code in listobject.c * SHOW_TRACK_COUNT code in tupleobject.c * PyConfig.show_alloc_count field * -X showalloccount command line option * @test.support.requires_type_collecting decorator
This commit is contained in:
parent
869c0c99b9
commit
c6e5c1123b
34 changed files with 24 additions and 469 deletions
|
@ -35,10 +35,6 @@ PyObject *_PyLong_One = NULL;
|
|||
#define IS_SMALL_INT(ival) (-NSMALLNEGINTS <= (ival) && (ival) < NSMALLPOSINTS)
|
||||
#define IS_SMALL_UINT(ival) ((ival) < NSMALLPOSINTS)
|
||||
|
||||
#ifdef COUNT_ALLOCS
|
||||
Py_ssize_t _Py_quick_int_allocs, _Py_quick_neg_int_allocs;
|
||||
#endif
|
||||
|
||||
static PyObject *
|
||||
get_small_int(sdigit ival)
|
||||
{
|
||||
|
@ -46,12 +42,6 @@ get_small_int(sdigit ival)
|
|||
PyThreadState *tstate = _PyThreadState_GET();
|
||||
PyObject *v = (PyObject*)tstate->interp->small_ints[ival + NSMALLNEGINTS];
|
||||
Py_INCREF(v);
|
||||
#ifdef COUNT_ALLOCS
|
||||
if (ival >= 0)
|
||||
_Py_quick_int_allocs++;
|
||||
else
|
||||
_Py_quick_neg_int_allocs++;
|
||||
#endif
|
||||
return v;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue