[lworld] RFR: 8341759: [lworld] JIT support for nullable, atomic, flat fields

Tobias Hartmann thartmann at openjdk.org
Thu Jan 30 08:24:39 UTC 2025


This change adds support for nullable, atomic, flat fields in C1 and C2 on AArch64 and x64.

This includes:
- Null marker support in fields and in the calling convention (which currently mirrors the field layout). The main complexity comes from the fact that null markers are no real fields and therefore need to be special cased in quite a few places.
- Converting a value object to / from a payload. This required significant changes, especially in C2 where we need to emit shift/mask operations for packing/unpacking field values to/from the scalar representation. C2 did not like loading a long value and suddenly assuming that a part of this long is now an oop, and we also need to be careful that this conversion does not float below a safepoint because then the GC would not know about the oop.
- GC barrier changes to support writing a payload that includes (narrow) oops. This was challenging due to G1 late barrier expansion that expects that there is a 1-1 relation between stores and pre-/post-barriers but now we might require two barriers for an atomic store to a flat field with two 32-bit compressed oops. The current implementation is rather hacky and should be re-visited later.
- Lots of new tests and some problem listing of existing / independent issues to get compiler stress testing clean.

Follow-up work will be done when implementing support for nullable, atomic, flat arrays with [JDK-8341767](https://bugs.openjdk.org/browse/JDK-8341767).

Thanks,
Tobias

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

Commit messages:
 - GC asserts
 - Fixed problem listing
 - More refactoring
 - Refactoring, step 2
 - Refactoring step 1
 - More fixes
 - Merge branch 'lworld' into JDK-8341759
 - More fixes
 - Some refactoring
 - More fixes
 - ... and 30 more: https://git.openjdk.org/valhalla/compare/287a7b55...900839bb

Changes: https://git.openjdk.org/valhalla/pull/1318/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1318&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8341759
  Stats: 2313 lines in 65 files changed: 2030 ins; 72 del; 211 mod
  Patch: https://git.openjdk.org/valhalla/pull/1318.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1318/head:pull/1318

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


More information about the valhalla-dev mailing list