-
Notifications
You must be signed in to change notification settings - Fork 10
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
Push pinning roots #142
Conversation
mmtk/src/scanning.rs
Outdated
@@ -189,6 +198,80 @@ impl Scanning<JuliaVM> for VMScanning { | |||
} | |||
} | |||
|
|||
pub unsafe fn mmtk_scan_gcstack_roots<EV: EdgeVisitor<JuliaVMEdge>>( |
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.
This function looks very similar to the old mmtk_scan_gcstack
. How is it different? Can you reduce duplicated code between those two functions?
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.
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.
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.
LGTM
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.