[lworld] RFR: 8331006: [lworld] Support of null markers for nullable flat fields

David Simms dsimms at openjdk.org
Thu Apr 25 10:40:42 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/field_layout/NullMarkersTest.java line 276:

> 274:     OutputAnalyzer out = new OutputAnalyzer(pb.start());
> 275: 
> 276:     Asserts.assertEquals(out.getExitValue(), 0, "Something went wrong while running the tests");

Speeds up problem solving if the output and error streams for processes is printed...there is the same issue with `PrintFieldLayout` not being product flag

-------------

PR Review Comment: https://git.openjdk.org/valhalla/pull/1078#discussion_r1579256501



More information about the valhalla-dev mailing list