On Wed, 9 Sep 2026 23:49:46 GMT, Serguei Spitsyn <[email protected]> wrote:
>> Yasumasa Suenaga has updated the pull request with a new target base due to >> a merge or a rebase. The pull request now contains 18 commits: >> >> - Rename to "Value" from "Inline" >> - Merge branch 'master' into JDK-8390106 >> - Merge remote-tracking branch 'origin/master' into JDK-8390106 >> - Update testcase >> - Add override methods >> - Check null marker for value object >> - Merge branch 'master' into JDK-8390106 >> - Update comments >> - Add isInline() >> - Update >> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/FlattenedInline.java >> >> Co-authored-by: Chris Plummer <[email protected]> >> - ... and 8 more: https://git.openjdk.org/jdk/compare/4c98aa9d...932cbd82 > > src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ValueKlass.java line > 93: > >> 91: public int nullMarkerOffset() { >> 92: return members().nullMarkerOffset(); >> 93: } > > This reads the null marker address from the ValueKlass layout unconditionally. > A null marker is needed for a nullable flattened fields. > If I understand correctly, null-restricted (non-null) flat fields may have no > null marker. > You may want to try the function > `InstanceKlass::field_is_null_free_inline_type(int index)`. > The function `fieldDescriptor::has_null_marker()` can be used as well. `ValueKlass` is a mirror of `valueKlass` in HotSpot, thus I think it is better not to add `has_null_marker()` to this class. `Field` in SA already has `fieldDescriptor::has_null_marker()` like feature, so I use it in `ObjectHeap::newOop` to instantiate flattened value. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32310#discussion_r3974565224
