Skip to content

pystats: #116206 (Incremental GC implementation) broke pystats build#117122

@mdboom

Description

@mdboom

Bug report

Bug description:

Since #116206 was merged, pystats builds are broken:

gcc -c -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I./Include/internal/mimalloc -I. -I./Include -DPy_BUILD_CORE -o Python/gc.o Python/gc.c In file included from ./Include/internal/pycore_interp.h:16, from ./Include/internal/pycore_ceval.h:13, from Python/gc.c:6: Python/gc.c: In function ‘gc_collect_young’: Python/gc.c:1287:24: error: ‘GCStats’{aka ‘struct _gc_stats’} has no member named ‘objects_queued’; did you mean ‘objects_collected’? 1287 | GC_STAT_ADD(0, objects_queued, count); | ^~~~~~~~~~~~~~ ./Include/internal/pycore_code.h:307:82: note: in definition of macro ‘GC_STAT_ADD’ 307 | #define GC_STAT_ADD(gen, name, n) do{if (_Py_stats) _Py_stats->gc_stats[(gen)].name += (n)} while (0) | ^~~~ Python/gc.c: In function ‘completed_cycle’: Python/gc.c:1387:16: warning: unused variable ‘not_visited’ [-Wunused-variable] 1387 | PyGC_Head *not_visited = &gcstate->old[gcstate->visited_space^1].head; | ^~~~~~~~~~~ Python/gc.c: In function ‘gc_collect_increment’: Python/gc.c:1424:20: error: ‘GCStats’{aka ‘struct _gc_stats’} has no member named ‘objects_queued’; did you mean ‘objects_collected’? 1424 | GC_STAT_ADD(1, objects_queued, region_size); | ^~~~~~~~~~~~~~ ./Include/internal/pycore_code.h:307:82: note: in definition of macro ‘GC_STAT_ADD’ 307 | #define GC_STAT_ADD(gen, name, n) do{if (_Py_stats) _Py_stats->gc_stats[(gen)].name += (n)} while (0) | ^~~~ Python/gc.c:1424:36: error: ‘region_size’ undeclared (first use in this function) 1424 | GC_STAT_ADD(1, objects_queued, region_size); | ^~~~~~~~~~~ ./Include/internal/pycore_code.h:307:91: note: in definition of macro ‘GC_STAT_ADD’ 307 | #define GC_STAT_ADD(gen, name, n) do{if (_Py_stats) _Py_stats->gc_stats[(gen)].name += (n)} while (0) | ^ Python/gc.c:1424:36: note: each undeclared identifier is reported only once for each function it appears in 1424 | GC_STAT_ADD(1, objects_queued, region_size); | ^~~~~~~~~~~ ./Include/internal/pycore_code.h:307:91: note: in definition of macro ‘GC_STAT_ADD’ 307 | #define GC_STAT_ADD(gen, name, n) do{if (_Py_stats) _Py_stats->gc_stats[(gen)].name += (n)} while (0) | ^ Python/gc.c: In function ‘_PyGC_Collect’: Python/gc.c:1810:9: error: ‘_py_stats’ undeclared (first use in this function); did you mean ‘_Py_stats’? 1810 | if (_py_stats){| ^~~~~~~~~ | _Py_stats make: *** [Makefile:2970: Python/gc.o] Error 1 

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

Labels

skip newstype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions