Skip to content

Conversation

@qinsoon
Copy link
Member

@qinsoon qinsoon commented Dec 3, 2024

This PR ports #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).

@qinsoon qinsoon marked this pull request as ready for review December 3, 2024 21:32
@qinsoon qinsoon requested a review from udesou December 3, 2024 21:32
Copy link

@udesou udesou left a comment

Choose a reason for hiding this comment

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

LGTM (except for the minor question below)

return bump_alloc_fast(mutator, (uintptr_t*)&allocator->cursor, (intptr_t)allocator->limit, size, align, offset, 0);
}

inline void mmtk_immix_post_alloc_slow(MMTkMutatorContext* mutator, void* obj, size_t size) {
Copy link

Choose a reason for hiding this comment

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

Wouldn't be useful to keep this for debugging purposes? That was the only reason I left it there --- I think you had something like that for the write barriers too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. It would be useful in some cases. It allows us to do post alloc in Rust, and it is independent from alloc (e.g. inlined alloc with a post alloc call). However, I am not sure if this is really useful. Without it, we can still disable in lined alloc, and do alloc call which includes post alloc.

Besides, if we would like to do this 'post_alloc_slow' call, we will need to make it visible to the codegen. Julia does not differentiate alloc and post alloc in its own GC (post alloc is just a part of the alloc call). In the GC interface, there is no separate post alloc and we do post alloc in those alloc functions as well. So while we can use the term post alloc in MMTk code, I feel it a bit confusing to introduce the term 'post alloc' to Julia.

So it seems it is unclear whether it would be useful to allow post alloc calls for debugging, and it would be confusing to the code base to have it implemented. I think it might be a good idea to just remove it.

@qinsoon qinsoon merged commit dd0a1c3 into mmtk:dev Dec 3, 2024
4 checks passed
qinsoon added a commit to mmtk/mmtk-julia that referenced this pull request Dec 4, 2024
This PR ports #158 to `dev`, and
updates Julia to mmtk/julia#76.
qinsoon added a commit to qinsoon/julia that referenced this pull request Feb 6, 2025
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).
qinsoon added a commit to qinsoon/mmtk-julia that referenced this pull request Feb 6, 2025
This PR ports mmtk#158 to `dev`, and
updates Julia to mmtk/julia#76.
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