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

Push pinning roots #142

Merged
merged 12 commits into from
Apr 29, 2024
Merged

Conversation

udesou
Copy link
Contributor

@udesou udesou commented Mar 19, 2024

Supporting processing roots in the shadow stack that are not transitively pinned (only the root object is pinned), and therefore should enable moving more objects.

NB: Should be merged with mmtk/julia#43.

@udesou udesou requested a review from qinsoon March 19, 2024 00:53
@@ -189,6 +198,80 @@ impl Scanning<JuliaVM> for VMScanning {
}
}

pub unsafe fn mmtk_scan_gcstack_roots<EV: EdgeVisitor<JuliaVMEdge>>(
Copy link
Member

Choose a reason for hiding this comment

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

This function looks very similar to the old mmtk_scan_gcstack. How is it different? Can you reduce duplicated code between those two functions?

Copy link
Contributor Author

@udesou udesou Mar 19, 2024

Choose a reason for hiding this comment

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

The main difference is that mmtk_scan_gcstack uses a single closure (as it's called when scanning objects) and mmtk_scan_gcstack_roots uses two closures (one for transitively pinned roots, and another for pinning roots). I tried using a single function, but I didn't find any way to call it with a single closure when scanning objects - if I try passing a single closure as both arguments, the rust compiler complains about having two mutable references of the closure.

Maybe I found a way. Will push it.

Copy link
Member

@qinsoon qinsoon left a comment

Choose a reason for hiding this comment

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

LGTM

@qinsoon qinsoon merged commit c1ccd57 into mmtk:v1.9.2+RAI Apr 29, 2024
17 checks passed
qinsoon added a commit to qinsoon/mmtk-julia that referenced this pull request Nov 7, 2024
qinsoon added a commit that referenced this pull request Nov 7, 2024
Port #142 to `dev`. Process both
transitively pinning roots, and non transitively pinning roots.
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