Skip to content

Root GC side tables and expand store-audit coverage#2349

Open
andrewtdiz wants to merge 16 commits into
PerryTS:mainfrom
andrewtdiz:codex/gc-side-table-store-audit
Open

Root GC side tables and expand store-audit coverage#2349
andrewtdiz wants to merge 16 commits into
PerryTS:mainfrom
andrewtdiz:codex/gc-side-table-store-audit

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

Summary

  • make class/prototype/native-module side-table values precise barriered roots
  • root class prototype-object and parent-closure side tables
  • make symbol side-table values precise barriered roots
  • resolve unaudited generated GC stores
  • expand the GC store-site inventory scanner coverage

Stack note

This is a stacked draft after #2339, #2343, #2344, #2345, and #2348. Until those land, the GitHub diff against main includes earlier GC slices too.

Verification

  • python3 scripts/gc_store_site_inventory.py --self-test
  • bash tests/test_gc_store_site_inventory.sh
  • cargo test -q -p perry-runtime gc::tests::runtime_roots --lib
  • cargo test -q -p perry-runtime gc::tests::copying --lib
  • cargo test -q -p perry-runtime gc::tests::cycle_state --lib
  • cargo check -q -p perry-runtime -p perry-codegen -p perry-ffi
  • cargo fmt --check
  • git diff --check HEAD

@andrewtdiz andrewtdiz force-pushed the codex/gc-side-table-store-audit branch 2 times, most recently from ea1cd47 to 7a069b4 Compare May 29, 2026 01:12
@proggeramlug
Copy link
Copy Markdown
Contributor

Heads-up: this one needs a rebase onto current main rather than a mechanical conflict-resolve, and I didn't want to guess inside the GC.

main's GC trigger path has evolved in parallel with this debt-pacing/cycle-state series, so the conflicts here are semantic, not textual — e.g. gc/mod.rs, arena/block.rs, and gc/policy.rs carry competing descriptions of the same path (legacy_synchronous on main vs. the debt-paced/bounded-assist behavior this PR introduces), plus new GcTriggerKind::Emergency and debt/pause telemetry fields that have to line up with whatever landed on main. Resolving those by hand risks introducing a GC correctness bug that the unit tests wouldn't reliably catch.

#2339 (pause/progress contract) and #2343 (resumable-cycle: ffi_code + budgeted_step_api tests) were mechanical and are merged/green. Could you rebase this part of the stack onto current main so the trigger-path behavior + telemetry reconcile against what's actually there now? I resolved & pushed the rest of your open PRs (~25 stream/buffer/util/url/assert/etc.) this round.

@andrewtdiz andrewtdiz force-pushed the codex/gc-side-table-store-audit branch from 518e8b3 to 92bfc24 Compare May 29, 2026 22:10
@andrewtdiz andrewtdiz force-pushed the codex/gc-side-table-store-audit branch from 92bfc24 to e3f2622 Compare May 30, 2026 00:58
# Conflicts:
#	crates/perry-runtime/src/gc/tests/cycle_state.rs
#	crates/perry-runtime/src/gc/tests/runtime_roots.rs
#	crates/perry-runtime/src/node_stream_readwrite.rs
@andrewtdiz andrewtdiz marked this pull request as ready for review May 30, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants