[lworld] RFR: 8331006: [lworld] Support of null markers for nullable flat fields
David Simms
dsimms at openjdk.org
Thu Apr 25 10:21:39 UTC 2024
On Thu, 18 Apr 2024 20:40:22 GMT, Frederic Parain <fparain at openjdk.org> wrote:
> This is the first step in supporting nullable flat fields in JEP 401.
> Those changes give value fields the optional capability to be associated with a null marker that indicates if the value if the field is null or not. Null markers are integrated in the object layout, and in the field metadata (in both compresses and uncompressed forms).
> Field accesses in the x86 and the arch64 interpreter have been extended to check the presence of a null marker when reading a field. If present, the null marker is checked in reads and updated on writes.
>
> The field layout logic is becoming more complex (and the complexity will continue to increase in the future with the addition of atomic flat fields and atomic nullable flat fields). So the changeset includes a test framework able to verify the consistency of fields layout using the output of -XX:+PrintFieldLayout. The format of data printed by PrintFieldLayout has been extended and modified to be easier to parse.
test/hotspot/jtreg/runtime/valhalla/inlinetypes/NullableFlatFieldTest.java line 29:
> 27: * @modules java.base/jdk.internal.vm.annotation
> 28: * @enablePreview
> 29: * @run main/othervm -XX:+EnableNullableFieldFlattening -XX:+PrintInlineLayout NullableFlatFieldTest
`PrintInlineLayout` isn't a "product flag" is it ? Should the test be debug only, or should we make `PrintInlineLayout` a product flag ? I'd consider the later for EA release.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1078#discussion_r1579233942
More information about the valhalla-dev
mailing list