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

Frederic Parain fparain at openjdk.org
Tue Apr 23 17:51:04 UTC 2024


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.

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

Commit messages:
 - More cleanup
 - Merge remote-tracking branch 'upstream/lworld' into null_flat
 - Fixes and cleanup
 - Merge remote-tracking branch 'upstream/lworld' into null_flat
 - Document nullable flat field access protocols
 - Add internal null marker support, aarch64 support, unsafe support
 - Add support for internal null markers in layouts and tests
 - Add layout test framework plus bug fixes
 - Fix metadata, FieldInfoStream and printing
 - Merge remote-tracking branch 'upstream/lworld' into null_flat
 - ... and 3 more: https://git.openjdk.org/valhalla/compare/2a85be04...684da164

Changes: https://git.openjdk.org/valhalla/pull/1078/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1078&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8331006
  Stats: 1964 lines in 37 files changed: 1772 ins; 13 del; 179 mod
  Patch: https://git.openjdk.org/valhalla/pull/1078.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1078/head:pull/1078

PR: https://git.openjdk.org/valhalla/pull/1078



More information about the valhalla-dev mailing list