-
Notifications
You must be signed in to change notification settings - Fork 71
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
Expose VO bit functions #1157
Expose VO bit functions #1157
Conversation
@@ -12,6 +12,18 @@ use std::fmt; | |||
use std::io::Result; | |||
use std::sync::atomic::{AtomicU8, Ordering}; | |||
|
|||
#[cfg(feature = "vo_bit")] |
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.
It's just not right to put VO bit specific functions in side_metadata::global
. I suggest we make the vo_bit
module public, and mark functions not intended to be public as pub(crate)
. It is actually part of the plan to make (Update: Sorry. I think that issue conflicts with our recent discussion in some ways. But feel free to make the vo_bit
public. See: #804vo_bit
module public.)
I am not sure if it is a good idea to bulk set vo bit. VO bit means a valid object. Bulk setting vo bits clearly violates the contract. Addresses with vo bits set may not be an object. For example, when we have internal pointers and we try to find the base pointer, MMTk will give incorrect results, as the contract about VO bits is broken. However, I dont know what we should do for Julia's boot image. Is it possible to find each object in the boot image? I looked at https://github.com/mmtk/julia/blob/d907a0630b4551cfbb321366da6e96242ada25d1/src/staticdata.c#L2844, and it doesn't look like an easy thing to do. |
I guess the other option is to ignore immortal objects altogether. |
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 can be closed. #1248 exposed the VO bit under a feature, and Julia is using the feature. |
Currently Julia needs to bulk set the VO bit for boot image regions of code.
While hacky, this solution seems to work and shouldn't be too problematic given we only do that for permalloc-ed objects.
This PR makes the functions
bzero_vo_bit
andbset_vo_bit
public viautil/metadata/side_metadata/global.rs
so that it can be called by the Julia binding.