Skip to content

Conversation

@udesou
Copy link

@udesou udesou commented Jun 25, 2024

This PR allows setting mmtk's VO bit using the post_alloc function. I've added an option MMTK_CONSERVATIVE that needs to be set (inside Make.user) in order to enable it. Note that I've also kept the possibility of using the slow path post_alloc for debugging purposes.

@udesou udesou requested a review from qinsoon June 26, 2024 06:18
@udesou udesou marked this pull request as ready for review July 8, 2024 00:16
src/julia.h Outdated
}

STATIC_INLINE void mmtk_immortal_post_alloc_fast(MMTkMutatorContext* mutator, void* obj, size_t size) {
intptr_t addr = (intptr_t) obj;
Copy link
Member

Choose a reason for hiding this comment

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

The code to set VO bit is exactly the same for all the spaces. You can extract it to be a separate inlined function, and remove the duplicated code in mmtk_immix_post_alloc_fast and mmtk_immortal_post_alloc_fast.

@udesou udesou requested a review from qinsoon July 9, 2024 06:00
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

@udesou udesou merged commit 084d8a0 into mmtk:v1.9.2+RAI Jul 9, 2024
udesou added a commit to mmtk/mmtk-julia that referenced this pull request Jul 11, 2024
This PR introduces the `is_mmtk_object` feature supporting a valid
object (VO) bit for conservative stack scanning. It also sets this
feature as default.

NB: merge with mmtk/julia#59.
~NB2: it requires a change in `mmtk-core` to expose an api function to
bulk set the VO bit. (see mmtk/mmtk-core#1157
@qinsoon qinsoon mentioned this pull request Dec 3, 2024
qinsoon added a commit that referenced this pull request 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 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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants