Skip to content

Add field-logging barrier and field unlog bit (JDK21) - #359

Draft
wks wants to merge 4 commits into
mmtk:jdk-21from
wks:feature/field-log-barrier
Draft

Add field-logging barrier and field unlog bit (JDK21)#359
wks wants to merge 4 commits into
mmtk:jdk-21from
wks:feature/field-log-barrier

Conversation

@wks

@wks wks commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Upstream PR: mmtk/mmtk-core#1528

Comment thread mmtk/src/slots.rs
Comment on lines +210 to +211
assert!(!COMPRESSED);
self.addr

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I just realized this issue in my branch. I think something like the below is better:

Suggested change
assert!(!COMPRESSED);
self.addr
if COMPRESSED {
self.untagged_address()
} else {
self.addr
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I will eventually do this. Currently the 1 bit per word field unlog bit side metadata doesn't work for compressed pointers, so I want it to fail loud. To support compressed pointers, I will introduce an alternative 1 bit per 32 bit field unlog bit side metadata and give the VM binding the option to select that.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ah fair enough. Makes sense. I just found this bug in my branch so I thought it'd be better to make a comment here in case you also have issues with the same in the future.

wks added 2 commits July 27, 2026 16:51
`ObjectBarrier` -> `GenBarrier`.  It is related to generational GC, and
can be object or field-grained.

`UnlogBit` -> `ObjectUnlogBit`.  Added `Object` prefix to prepare for
adding field unlog bit barriers.
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.

2 participants