-
Notifications
You must be signed in to change notification settings - Fork 3
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
Setting up post alloc function to set VO bit #59
Conversation
src/julia.h
Outdated
@@ -2536,10 +2556,17 @@ STATIC_INLINE void* mmtk_immortal_alloc_fast(MMTkMutatorContext* mutator, size_t | |||
} | |||
|
|||
STATIC_INLINE void mmtk_immortal_post_alloc_fast(MMTkMutatorContext* mutator, void* obj, size_t size) { | |||
intptr_t addr = (intptr_t) obj; |
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 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
.
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 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
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).
This PR allows setting mmtk's VO bit using the
post_alloc
function. I've added an optionMMTK_CONSERVATIVE
that needs to be set (insideMake.user
) in order to enable it. Note that I've also kept the possibility of using the slow pathpost_alloc
for debugging purposes.