Skip to content

Fix ImmixSpace liveness check #552

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

Closed
wants to merge 1 commit into from
Closed

Fix ImmixSpace liveness check #552

wants to merge 1 commit into from

Conversation

wenyuzhao
Copy link
Member

@wenyuzhao wenyuzhao commented Feb 22, 2022

Fix ImmixSpace's is_live and get_forwarded_object for mmtk/mmtk-openjdk#141 .


The context of this PR:

OpenJDK has several object cache (or storage) that should be processed during GC. For example, CodeCache may contain embedded pointers. Our old approach is to treat all the objects in these storages as root pointers -- and caused memory leak. mmtk/mmtk-openjdk#141 tries to update these storages before the end of each GC, including removing dead objects and updating forwarded objects.

To support this. all mmtk spaces should implement is_live and get_forwarded_object correctly.

@tianleq Looks like there's some difficulty implementing get_forwarded_object for MarkCompactSpace? Is it because the MarkCompactSpace does not use object_forwarding?


TODO: MarkCompactSpace needs to be fixed as well...

@tianleq
Copy link
Collaborator

tianleq commented Feb 22, 2022

Yes, markcompact moves objects through a linear scan

@qinsoon
Copy link
Member

qinsoon commented Feb 8, 2023

get_forwarded_object is fixed in #753 for ImmixSpace. Setting mark bit in Immix post_copy is included in master.

fn post_copy(&mut self, obj: ObjectReference, _bytes: usize) {
// Mark the object
VM::VMObjectModel::LOCAL_MARK_BIT_SPEC.store_atomic::<VM, u8>(
obj,
self.get_space().mark_state,
None,
Ordering::SeqCst,
);

We can close this PR.

@qinsoon qinsoon closed this Feb 8, 2023
@k-sareen k-sareen deleted the fix-roots-leak branch April 27, 2023 05:39
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.

None yet

3 participants