-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add the "null" garbage collector #9484
Conversation
Subscribe to Label Actioncc @fitzgen
This issue or pull request has been labeled: "wasmtime:api", "wasmtime:config", "wasmtime:ref-types"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
Label Messager: wasmtime:configIt looks like you are changing Wasmtime's configuration options. Make sure to
To modify this label's message, edit the To add new label messages or remove existing label messages, edit the |
Subscribe to Label Actioncc @fitzgen
This issue or pull request has been labeled: "fuzzing"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
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.
Very nice! I like how this shaped up. I hope the #[cfg]
wasn't too much to add, but it all looks relatively focused to be so it's hopefully just a one-time cost.
Thanks!
Indeed, it was mostly some shuffling to get rid of the disabled collector impl and then realizing that various things that were DRC-specific modules could actually be made a little more generic and reused with other collectors. I think adding the copying collector will be relatively small in comparison to this PR, which is kind of funny. |
The null collector does not actually collect any garbage, it simply bump-allocates until the heap is exhausted, at which point further allocation attempts will fail. It does not require any GC barriers. Users can configure which collector to use via the `wasmtime::Config::collector` method or the `-C collector=drc|null` CLI flag. The `wasmtime::Collector` enumeration, similar to the `wasmtime::Strategy` enumeration but for choosing a collector rather than a compiler, additionally has a table summarizing the properties and characteristics of our current set of collector implementations. Finally, we also run `.wast` tests that exercise GC types under both the DRC and null collectors. I tried to avoid running tests that are not related to GC under both configurations just to avoid a combinatorial blow up.
Which was causing test failures, since we no longer return a GC store with a dummy heap.
The null collector does not actually collect any garbage, it simply bump-allocates until the heap is exhausted, at which point further allocation attempts will fail. It does not require any GC barriers.
Users can configure which collector to use via the
wasmtime::Config::collector
method or the-C collector=drc|null
CLI flag. Thewasmtime::Collector
enumeration, similar to thewasmtime::Strategy
enumeration but for choosing a collector rather than a compiler, additionally has a table summarizing the properties and characteristics of our current set of collector implementations.Finally, we also run
.wast
tests that exercise GC types under both the DRC and null collectors. I tried to avoid running tests that are not related to GC under both configurations just to avoid a combinatorial blow up.