-
Bug
-
Resolution: Unresolved
-
P2
-
repo-valhalla
We would need to:
- Make sure private buffers are never scalarized (also not in safepoints)
- Be careful when removing redundant allocations to not replace larval buffer allocations by "normal" buffer allocations
- Make sure the Unsafe.get*/put* operations have an effect
- Scalarize only after finishPrivateBuffer
This manifests, for example, with TestIntrinsics when being executed with -XX:DisableIntrinsic=_putInt because the call to Unsafe.putInt has no effect on the scalarized inline type.
Also, code like this currently crashes C2's typesystem:
MyValue incrementAndCheckUnsafe() {
MyValue vt = U.makePrivateBuffer(this);
U.putInt(vt, X_OFFSET, x + 1);
U.putInt(vt, Y_OFFSET, y + 1);
return vt;
}
This also manifests with tests being executed with -XX:+DeoptimizeALot.
- duplicates
-
JDK-8239004 [lworld] Unsafe.makePrivateBuffer should return an Object
- Closed
-
JDK-8265258 lworld] "assert(v->mark().is_larval_state()) failed: must be a larval value" with DeoptimizeALot
- Closed
-
JDK-8317659 [lworld] Incorrect unsafe put operation over value objects.
- Closed
-
JDK-8306659 Deoptimization does not preserve larval state for rematerialized objects.
- Closed
-
JDK-8306669 Disabling in-lining prevent propagating larval state
- Closed
- is blocked by
-
JDK-8239004 [lworld] Unsafe.makePrivateBuffer should return an Object
- Closed
- relates to
-
JDK-8303416 [lworld] Fix JVM crash at Unsafe_FinishPrivateBuffer
- Resolved
-
JDK-8317659 [lworld] Incorrect unsafe put operation over value objects.
- Closed
-
JDK-8322547 [lworld] Add support for larval bit preservation during de-optimization.
- Open
-
JDK-8206144 [lworld] Adapt and add C2 intrinsics for value types Unsafe API
- Resolved
-
JDK-8319972 [lworld+vector] Enable intrinsification of Unsafe.finishPrivateBuffer.
- Resolved
- links to
-
Review openjdk/valhalla/964