-
Notifications
You must be signed in to change notification settings - Fork 78
Remove GCRequester, move related code to GCTrigger #1405
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
Conversation
|
This PR was originally created to support a fix for #1398. By consolidating all GC-triggering logic into I’ve also prototyped a thread-safe “enable collection” API, but it turned out to be difficult to use from Julia due to the issues described in mmtk/mmtk-julia#278. Since Julia is the main reason we need these APIs, it doesn’t make much sense to introduce them if they don’t integrate well there. As a result, a proper fix for #1398 may be postponed. Given that said, I think this PR on its own is still a good cleanup, even if there’s no immediate follow-up to fix #1398. |
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.
Just one minor problem. Other parts look good.
src/util/heap/gc_trigger.rs
Outdated
| fn get_plan(&self) -> &dyn Plan<VM = VM> { | ||
| unsafe { self.plan.assume_init() } | ||
| } |
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 method is identical to GCTrigger::plan. Keep one of them and move the other.
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.
Done. I didn't realize we had that function.
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 See comment below
|
I grepped the code and found there are still comments mentioning the And the eBPF tools |
|
Done. I further pushed a change for |
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
This PR moves GC triggering related code to
GCTrigger, including:GCRequesterwhich handles the request for GCs.is_collection_enabledinmemory_managerandSpace::acquire.MMTK.