mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +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
|
@ -1173,10 +1173,6 @@ Py_Initialize(void)
|
|||
}
|
||||
|
||||
|
||||
#ifdef COUNT_ALLOCS
|
||||
extern void _Py_dump_counts(FILE*);
|
||||
#endif
|
||||
|
||||
/* Flush stdout and stderr */
|
||||
|
||||
static int
|
||||
|
@ -1393,13 +1389,6 @@ Py_FinalizeEx(void)
|
|||
* XXX I haven't seen a real-life report of either of these.
|
||||
*/
|
||||
_PyGC_CollectIfEnabled();
|
||||
#ifdef COUNT_ALLOCS
|
||||
/* With COUNT_ALLOCS, it helps to run GC multiple times:
|
||||
each collection might release some types from the type
|
||||
list, so they become garbage. */
|
||||
while (_PyGC_CollectIfEnabled() > 0)
|
||||
/* nothing */;
|
||||
#endif
|
||||
|
||||
/* Clear all loghooks */
|
||||
/* We want minimal exposure of this function, so define the extern
|
||||
|
@ -1451,10 +1440,6 @@ Py_FinalizeEx(void)
|
|||
/* unload faulthandler module */
|
||||
_PyFaulthandler_Fini();
|
||||
|
||||
/* Debugging stuff */
|
||||
#ifdef COUNT_ALLOCS
|
||||
_Py_dump_counts(stderr);
|
||||
#endif
|
||||
/* dump hash stats */
|
||||
_PyHash_Fini();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue