mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +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
|
@ -73,9 +73,6 @@ static const char usage_3[] = "\
|
|||
tracemalloc module. By default, only the most recent frame is stored in a\n\
|
||||
traceback of a trace. Use -X tracemalloc=NFRAME to start tracing with a\n\
|
||||
traceback limit of NFRAME frames\n\
|
||||
-X showalloccount: output the total count of allocated objects for each\n\
|
||||
type when the program finishes. This only works when Python was built with\n\
|
||||
COUNT_ALLOCS defined\n\
|
||||
-X importtime: show how long each import takes. It shows module name,\n\
|
||||
cumulative time (including nested imports) and self time (excluding\n\
|
||||
nested imports). Note that its output may be broken in multi-threaded\n\
|
||||
|
@ -800,7 +797,6 @@ _PyConfig_Copy(PyConfig *config, const PyConfig *config2)
|
|||
COPY_ATTR(tracemalloc);
|
||||
COPY_ATTR(import_time);
|
||||
COPY_ATTR(show_ref_count);
|
||||
COPY_ATTR(show_alloc_count);
|
||||
COPY_ATTR(dump_refs);
|
||||
COPY_ATTR(malloc_stats);
|
||||
|
||||
|
@ -903,7 +899,6 @@ config_as_dict(const PyConfig *config)
|
|||
SET_ITEM_INT(tracemalloc);
|
||||
SET_ITEM_INT(import_time);
|
||||
SET_ITEM_INT(show_ref_count);
|
||||
SET_ITEM_INT(show_alloc_count);
|
||||
SET_ITEM_INT(dump_refs);
|
||||
SET_ITEM_INT(malloc_stats);
|
||||
SET_ITEM_WSTR(filesystem_encoding);
|
||||
|
@ -1691,9 +1686,6 @@ config_read(PyConfig *config)
|
|||
if (config_get_xoption(config, L"showrefcount")) {
|
||||
config->show_ref_count = 1;
|
||||
}
|
||||
if (config_get_xoption(config, L"showalloccount")) {
|
||||
config->show_alloc_count = 1;
|
||||
}
|
||||
|
||||
status = config_read_complex_options(config);
|
||||
if (_PyStatus_EXCEPTION(status)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue