Skip to content
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

Support moving GCs in MMTk #57294

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft

Conversation

qinsoon
Copy link
Contributor

@qinsoon qinsoon commented Feb 6, 2025

WIP. Supporting moving GCs in MMTk. The plan does not remove some transitively pinning roots so still not many objects can be moved by the GC. That will be fixed in future PRs.

TODOs

udesou and others added 11 commits February 5, 2025 22:53
Port mmtk#43 to dev. Add _NO_TPIN macros for pushing GC frames.
This PR ports mmtk#58 to `dev`. This PR is mostly the same as mmtk#58 except that 1. this PR does not remove transitive pinning of shadow stack roots (we know it is unsound to remove the transitive pinning at this stage), and 2. this PR includes minor refactoring for GC codegen interface.
This PR ports mmtk#59 to `dev`. In addition, this PR 1. introduces `jl_gc_permsymbol` for allocating the special perm object in `mk_symbol`, 2. removes some seemingly unnecessary post alloc calls for `jl_gc_perm_alloc` in `datatype.c`, and 3. does not support set VO bit using the slowpath (MMTk call).
This PR ports mmtk/mmtk-julia#159 to `dev`. The difference is that this PR adds a general call to the GC interface `jl_gc_notify_thread_yield`. In this case, each GC will do what they need in the call, and the context is saved in the GC specific TLS.
… roots. (mmtk#84)

This PR
* differentiates `OBJ_PIN` from `PTR_PIN`. In rare cases, we have to deal with internal pointers, and have to use `PTR_PIN`.
* pins more objects that cannot be moved.
* traces all the `JL_GLOBALLY_ROOTED` symbols.

This PR still transitively pins `jl_global_roots_list`. Without transitive pinning, we observed assertions failures in the precompilation step during Julia build, saying we reach objects without the valid object bit. This issue will be debugged and fixed after this PR.
This PR introduces a non moving alloc function, and use it for certain types that are not supposed to be moved.
@qinsoon qinsoon added the GC: MMTK MMTK GC integration label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GC: MMTK MMTK GC integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants