[lworld] RFR: 8351569: [lworld] Revisit atomic access modes in flat var handles [v5]
Chen Liang
liach at openjdk.org
Fri Mar 21 15:39:31 UTC 2025
On Thu, 20 Mar 2025 18:21:59 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> 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 incrementally with one additional commit since the last revision:
>
> Tighten the signature of VarHandles::checkAtomicFlatArray
src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 2735:
> 2733: @ForceInline
> 2734: public final <V> Object getFlatValueOpaque(Object o, long offset, int layout, Class<?> valueType) {
> 2735: // this is stronger that opaque semantics
Suggestion:
// this is stronger than opaque semantics
src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 2735:
> 2733: @ForceInline
> 2734: public final <V> Object getFlatValueOpaque(Object o, long offset, int layout, Class<?> valueType) {
> 2735: // this is stronger that opaque semantics
Suggestion:
// this is stronger than opaque semantics
src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 2795:
> 2793: @ForceInline
> 2794: public final <V> void putFlatValueOpaque(Object o, long offset, int layout, Class<?> valueType, V x) {
> 2795: // this is stronger that opaque semantics
Suggestion:
// this is stronger than opaque semantics
src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 2795:
> 2793: @ForceInline
> 2794: public final <V> void putFlatValueOpaque(Object o, long offset, int layout, Class<?> valueType, V x) {
> 2795: // this is stronger that opaque semantics
Suggestion:
// this is stronger than opaque semantics
src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 3286:
> 3284: }
> 3285:
> 3286: public Object getAndSetFlatValue(Object o, long offset, int layoutKind, Class<?> valueType, Object newValue) {
Why no more `@ForceInline`?
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1402#discussion_r2007837918
PR Review Comment: https://git.openjdk.org/valhalla/pull/1402#discussion_r2007838405
PR Review Comment: https://git.openjdk.org/valhalla/pull/1402#discussion_r2007838080
PR Review Comment: https://git.openjdk.org/valhalla/pull/1402#discussion_r2007838571
PR Review Comment: https://git.openjdk.org/valhalla/pull/1402#discussion_r2007840859
More information about the valhalla-dev
mailing list