Skip to content
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

Fix is_live for ImmixSpace #842

Merged
merged 1 commit into from
Jun 2, 2023
Merged

Fix is_live for ImmixSpace #842

merged 1 commit into from
Jun 2, 2023

Conversation

wks
Copy link
Collaborator

@wks wks commented Jun 1, 2023

To save time during Prepare, we only clear the on-the-side forwarding bits for defrag sources. As a result, blocks which were defrag sources in the previous GC may still have stale forwarding bits from the previous GC. It makes it unreliable to use the forwarding bits alone to test if a given object is forwarded or not.

This commit lets is_alive also test whether the block is a defrag source before looking at the forwarding bits. If it is not a defrag source, it must not have been forwarded.

@wks wks requested a review from qinsoon June 1, 2023 08:26
To save time during `Prepare`, we only clear the on-the-side forwarding
bits for defrag sources.  As a result, blocks which were defrag sources
in the previous GC may still have stale forwarding bits from the
previous GC.  It makes it unreliable to use the forwarding bits alone to
test if a given object is forwarded or not.

This commit lets `is_alive` also test whether the block is a defrag
source before looking at the forwarding bits.  If it is not a defrag
source, it must not have been forwarded.
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

@qinsoon qinsoon added the PR-testing Run binding tests for the pull request (deprecated: use PR-extended-testing instead) label Jun 1, 2023
@wks wks merged commit 0d6ef2c into mmtk:master Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-testing Run binding tests for the pull request (deprecated: use PR-extended-testing instead)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants