Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mdboom opened this issue Mar 21, 2024 · 1 comment
Closed

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

mdboom opened this issue Mar 21, 2024 · 1 comment
Assignees
Labels
skip news type-bug An unexpected behavior, bug, or error

Comments

@mdboom
Copy link
Contributor

mdboom commented Mar 21, 2024

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

@mdboom mdboom added the type-bug An unexpected behavior, bug, or error label Mar 21, 2024
@mdboom mdboom self-assigned this Mar 21, 2024
mdboom added a commit to mdboom/cpython that referenced this issue Mar 21, 2024
@mdboom
Copy link
Contributor Author

mdboom commented Apr 2, 2024

Fixed.

@mdboom mdboom closed this as completed Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant