[lworld] RFR: 8351569: [lworld] Revisit atomic access modes in flat var handles [v8]

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Mar 21 19:02:30 UTC 2025


> This PR is an attempt to put var handle support for flat values on a more solid footing. Some more notes in a comment below.

Maurizio Cimadamore has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 16 additional commits since the last revision:

 - Address review commments
 - Simplify Unsafe::compareAndSetFlatValueAsBytes to use new unsafe flat array creation primitive
 - Merge branch 'lworld' into varhandle_flat
 - Add missing `@ForceInline`
 - Update src/java.base/share/classes/jdk/internal/misc/Unsafe.java
   
   Co-authored-by: Chen Liang <liach at openjdk.org>
 - Update src/java.base/share/classes/jdk/internal/misc/Unsafe.java
   
   Co-authored-by: Chen Liang <liach at openjdk.org>
 - Tighten the signature of VarHandles::checkAtomicFlatArray
 - Avoid dynamic var handle creation in the middle of array element access
 - Fix test header
 - Enhance compareAndSetFlatValueAsBytes to work on different kinds of flat arrays
   Cache result of oop-free analysis
   Beef up tests to check different combinations of VM flags
 - ... and 6 more: https://git.openjdk.org/valhalla/compare/fae70008...000917a3

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

Changes:
  - all: https://git.openjdk.org/valhalla/pull/1402/files
  - new: https://git.openjdk.org/valhalla/pull/1402/files/6b1b3794..000917a3

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1402&range=07
 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1402&range=06-07

  Stats: 144 lines in 5 files changed: 131 ins; 5 del; 8 mod
  Patch: https://git.openjdk.org/valhalla/pull/1402.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1402/head:pull/1402

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


More information about the valhalla-dev mailing list