Skip to content

Trigger GC in the DRC collector when the OASR list is twice the size it was after the last GC#13422

Merged
fitzgen merged 4 commits into
bytecodealliance:mainfrom
fitzgen:wasmtime-drc-over-approx-force-gc
May 21, 2026
Merged

Trigger GC in the DRC collector when the OASR list is twice the size it was after the last GC#13422
fitzgen merged 4 commits into
bytecodealliance:mainfrom
fitzgen:wasmtime-drc-over-approx-force-gc

Conversation

@fitzgen
Copy link
Copy Markdown
Member

@fitzgen fitzgen commented May 20, 2026

This should trigger collection in more situations than just filling up the heap from allocation.

Fixes #13403 in theory, but I haven't been able to measure sweep times reported in that issue without this fix on my laptop. FWIW, that issue does refer to Android, and so is probably using radically different hardware.

@fitzgen fitzgen requested review from a team as code owners May 20, 2026 19:38
@fitzgen fitzgen requested review from cfallin and removed request for a team May 20, 2026 19:38
@github-actions github-actions Bot added wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:ref-types Issues related to reference types and GC in Wasmtime labels May 20, 2026
@github-actions
Copy link
Copy Markdown

Subscribe to Label Action

cc @fitzgen

Details This issue or pull request has been labeled: "wasmtime:api", "wasmtime:ref-types"

Thus the following users have been cc'd because of the following labels:

  • fitzgen: wasmtime:ref-types

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

Copy link
Copy Markdown
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread crates/cranelift/src/func_environ/gc/enabled/drc.rs
fitzgen added 4 commits May 21, 2026 11:28
…it was after the last GC

This should trigger collection in more situations than just filling up the heap
from allocation.

Fixes bytecodealliance#13403 in theory, but I
haven't been able to measure sweep times reported in that issue without this fix
on my laptop. FWIW, that issue does refer to Android, and so is probably using
radically different hardware.
@fitzgen fitzgen force-pushed the wasmtime-drc-over-approx-force-gc branch from e403269 to 734fab6 Compare May 21, 2026 18:32
@fitzgen fitzgen enabled auto-merge May 21, 2026 18:34
@fitzgen fitzgen added this pull request to the merge queue May 21, 2026
Merged via the queue into bytecodealliance:main with commit 9a0b0e0 May 21, 2026
51 checks passed
@fitzgen fitzgen deleted the wasmtime-drc-over-approx-force-gc branch May 21, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:ref-types Issues related to reference types and GC in Wasmtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DRC: per-GC sweep cost grows unbounded over time on steady-state Kotlin/Wasm workload (Android ANR after ~10–48 min)

2 participants