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

Adding support for MMTk (non-moving immix) #56288

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

Conversation

udesou
Copy link
Contributor

@udesou udesou commented Oct 22, 2024

This PR adds the possibility of building/running Julia using MMTk, running non-moving immix.
The binding code (Rust) associated with it is in https://github.com/mmtk/mmtk-julia/tree/upstream-ready/immix. Instructions on how to build/run Julia with MMTk are described in the README file inside the binding repo.

@udesou udesou changed the title Adding non-moving immix Adding support for MMTk (non-moving immix) Oct 22, 2024
src/gc-mmtk.c Outdated Show resolved Hide resolved
@nsajko nsajko added the GC Garbage collector label Oct 22, 2024
@@ -2452,8 +2452,122 @@ void LateLowerGCFrame::PlaceRootsAndUpdateCalls(SmallVectorImpl<int> &Colors, St
}
}

#ifdef MMTK_GC
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer it if this was a runtime option to the pass rather than a compiletime option.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean choosing MMTk as a runtime option or inlining the fastpath as a runtime option? The former is not really possible, at least not at this point. The latter should be possible, with maybe a small overhead of checking the runtime option variable every time we're running that pass.

Copy link
Member

Choose a reason for hiding this comment

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

I mean the latter

Value *callee = CI->getCalledOperand();
assert(callee);

auto GCAllocBytes = getOrNull(jl_intrinsics::GCAllocBytes);
Copy link
Member

Choose a reason for hiding this comment

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

You should be able to just iterate over users of this global rather than iterating through all statements, which is slow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GC Garbage collector
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants