-
-
Notifications
You must be signed in to change notification settings - Fork 164
feat(gc): generated GC call-effects table + call-graph checker (RFC deferred collection S1) #11565
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
Changes from all commits
5afc942
aaf8b44
44e5175
f6568eb
3fadd77
9900ef2
0f36d12
ff5ca0b
e99bd42
a4863b6
74f2062
011c996
924c6b3
9262210
151c10c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,9 @@ | ||||||
| **GC call effects now come from a generated, CI-checked table (RFC deferred collection, S1).** `classify_direct_callee` no longer uses the hand-kept allowlist. It reads `crates/perry-codegen/src/gc_effects/{linux-x86_64,macos-aarch64,windows-x86_64}.tsv` and takes the most conservative class of the three. | ||||||
|
|
||||||
| - **Generator.** The tables are generated by `scripts/gc_call_effects/callgraph.py` from a symbol-level call graph of the linked runtime/stdlib archives. Every seed, cut and exemption, each with its reason, is in `seeds.txt`. `why.py` prints the witness path to the tainting seed. | ||||||
| - **CI.** `gc-call-effects-linux` and `gc-call-effects` (macOS aarch64, Windows through `cargo xwin`) regenerate each table from freshly built archives and fail on any difference, with the witness path and the regenerated table as an artifact. `lint` runs a self-test that plants a `js_proxy_get` call in a leaf helper across ELF, Mach-O and COFF objects and requires the check to go red. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Correct the description of the drift policy. The changelog says the CI jobs "fail on any difference". In Proposed wording-regenerate each table from freshly built archives and fail on any difference, with the witness path and the regenerated table as an artifact.
+regenerate each table from freshly built archives. On a PR, only UNSAFE drift fails (a committed class weaker than the archives prove); on main-line tiers any difference fails. The witness path is printed and the regenerated table is uploaded as an artifact.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| - **Runtime.** The #11523 non-collecting root-registry guard is now a distinct type, `NonCollectingRootRegistryGuard`. Its drop has no path to `flush_deferred_gc_request`, so the graph can prove its callers leaf. | ||||||
| - **`root_reload`.** Its `NON_COLLECTING` list must agree with the table. | ||||||
| - **S2 fast paths.** The four GC-leaf IC hits S2 (#11554) hand-listed (`js_object_get_field_ic_fast`, `js_class_field_{get,set}_ic_fast`, `js_put_value_set_packed_fast`) now come out of the generated table as `Leaf` on all three targets, and their `_fast_miss` / `_packed_miss` continuations as collecting. No cut was needed for the two edges S2's census had to cut: the `Arena as Drop` TLS destructor is a `teardown` rule in `seeds.txt`, and `typed_feedback::invalidate_representation_change` takes the registry through `NonCollectingRootRegistryGuard`. | ||||||
| - **Windows build.** `PERRY_AGENT_PTRS` is no longer `#[no_mangle]` on Windows: MSVC's thread-local shim takes the same symbol name, so every release build of `perry-runtime` for `x86_64-pc-windows-msvc` failed with "symbol already defined". Only ELF executables name the symbol. | ||||||
| - **Measured against main**, on benchmarks/suite plus the 60 largest gap tests: −7.1 % statepoints and −3.4 % `gc.relocate`. | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Replace the retiring
macos-14runner.GitHub schedules
macos-14job failures during brownouts starting October 5, 2026, and will retire the runner on November 2, 2026. This new matrix leg feeds the required gate, so those runner failures will block planned checks before the table comparison runs. Use a supported arm64 runner such asmacos-15, then regenerate and check the macOS table on that runner. (github.com)🤖 Prompt for AI Agents