[lworld] RFR: 8349110: [lworld] Intrinsics for Unsafe.get/putFlatValue [v4]
Tobias Hartmann
thartmann at openjdk.org
Tue Jun 17 06:03:42 UTC 2025
On Mon, 16 Jun 2025 12:46:24 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> Hi,
>>
>> This PR implements intrinsics for `Unsafe::get/putFlatValue` and enables the corresponding tests in `TestIntrinsics`.
>>
>> Please kindly review, thanks very much.
>
> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>
> remove -DeoptimizeALot
Testing looks good now except for one last failure with `compiler/valhalla/inlinetypes/TestIntrinsics.java` and `-XX:Tier0BackedgeNotifyFreqLog=0 -XX:Tier2BackedgeNotifyFreqLog=0 -XX:Tier3BackedgeNotifyFreqLog=0 -XX:Tier2BackEdgeThreshold=1 -XX:Tier3BackEdgeThreshold=1 -XX:Tier4BackEdgeThreshold=1 -Xbatch`:
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/opt/mach5/mesos/work_dir/slaves/d2398cde-9325-49c3-b030-8961a4f0a253-S509733/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/d98a4bd7-58a9-4f29-b8d0-431bc28dcc7e/runs/a5899c58-42e7-464d-909b-9619da50104d/workspace/open/src/hotspot/share/prims/unsafe.cpp:256), pid=2121432, tid=2121433
# assert(_obj == nullptr || !_obj->is_inline_type() || _obj->mark().is_larval_state()) failed: must be an object instance or a larval inline type
#
# JRE version: Java(TM) SE Runtime Environment (25.0) (fastdebug build 25-lworld5ea-LTS-2025-06-16-1439046.tobias.hartmann.valhalla2)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-lworld5ea-LTS-2025-06-16-1439046.tobias.hartmann.valhalla2, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x1bbe2be] Unsafe_PutInt+0x28e
Stack: [0x00007ff7140b4000,0x00007ff7141b5000], sp=0x00007ff7141b33b0, free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x1bbe2be] Unsafe_PutInt+0x28e (unsafe.cpp:256)
J 3090 jdk.internal.misc.Unsafe.putInt(Ljava/lang/Object;JI)V java.base at 25-lworld5ea (0 bytes) @ 0x00007ff6fc8582c4 [0x00007ff6fc858220+0x00000000000000a4]
j compiler.valhalla.inlinetypes.TestIntrinsics.test84(Lcompiler/valhalla/inlinetypes/MyValue1;)Lcompiler/valhalla/inlinetypes/MyValue1;+46
j compiler.valhalla.inlinetypes.TestIntrinsics.test84_verifier()V+16
J 3280 c2 java.lang.invoke.LambdaForm$DMH+0x000000002e091000.invokeVirtual(Ljava/lang/Object;Ljava/lang/Object;)V java.base at 25-lworld5ea (14 bytes) @ 0x00007ff6fc883fe0 [0x00007ff6fc883fa0+0x0000000000000040]
j java.lang.invoke.LambdaForm$MH+0x000000002e105800.invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+35 java.base at 25-lworld5ea
J 3271 c2 jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base at 25-lworld5ea (92 bytes) @ 0x00007ff6fc881c80 [0x00007ff6fc881ba0+0x00000000000000e0]
j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base at 25-lworld5ea
j compiler.lib.ir_framework.test.CustomRunTest.invokeTest()V+49
J 3044 c2 compiler.lib.ir_framework.test.AbstractTest.run()V (41 bytes) @ 0x00007ff6fc846620 [0x00007ff6fc8465a0+0x0000000000000080]
J 3052% c2 compiler.lib.ir_framework.test.TestVM.runTests()V (535 bytes) @ 0x00007ff6fc84afdc [0x00007ff6fc84af20+0x00000000000000bc]
j compiler.lib.ir_framework.test.TestVM.start()V+9
j compiler.lib.ir_framework.test.TestVM.main([Ljava/lang/String;)V+38
v ~StubRoutines::call_stub 0x00007ff6fbd18001
V [libjvm.so+0x10a5728] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x508 (javaCalls.cpp:429)
V [libjvm.so+0x12037c0] jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, JavaThread*) [clone .constprop.1]+0x420 (jni.cpp:887)
V [libjvm.so+0x12077b4] jni_CallStaticVoidMethod+0x214 (jni.cpp:1746)
C [libjli.so+0x3b9a] invokeStaticMainWithArgs+0x4a (java.c:392)
C [libjli.so+0x4c78] JavaMain+0xf08 (java.c:640)
C [libjli.so+0x8019] ThreadJavaMain+0x9 (java_md.c:646)
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 3090 jdk.internal.misc.Unsafe.putInt(Ljava/lang/Object;JI)V java.base at 25-lworld5ea (0 bytes) @ 0x00007ff6fc858292 [0x00007ff6fc858220+0x0000000000000072]
j compiler.valhalla.inlinetypes.TestIntrinsics.test84(Lcompiler/valhalla/inlinetypes/MyValue1;)Lcompiler/valhalla/inlinetypes/MyValue1;+46
j compiler.valhalla.inlinetypes.TestIntrinsics.test84_verifier()V+16
J 3280 c2 java.lang.invoke.LambdaForm$DMH+0x000000002e091000.invokeVirtual(Ljava/lang/Object;Ljava/lang/Object;)V java.base at 25-lworld5ea (14 bytes) @ 0x00007ff6fc883fe0 [0x00007ff6fc883fa0+0x0000000000000040]
j java.lang.invoke.LambdaForm$MH+0x000000002e105800.invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+35 java.base at 25-lworld5ea
J 3271 c2 jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; java.base at 25-lworld5ea (92 bytes) @ 0x00007ff6fc881c80 [0x00007ff6fc881ba0+0x00000000000000e0]
j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base at 25-lworld5ea
j compiler.lib.ir_framework.test.CustomRunTest.invokeTest()V+49
J 3044 c2 compiler.lib.ir_framework.test.AbstractTest.run()V (41 bytes) @ 0x00007ff6fc846620 [0x00007ff6fc8465a0+0x0000000000000080]
J 3052% c2 compiler.lib.ir_framework.test.TestVM.runTests()V (535 bytes) @ 0x00007ff6fc84afdc [0x00007ff6fc84af20+0x00000000000000bc]
j compiler.lib.ir_framework.test.TestVM.start()V+9
j compiler.lib.ir_framework.test.TestVM.main([Ljava/lang/String;)V+38
v ~StubRoutines::call_stub 0x00007ff6fbd18001
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/1482#issuecomment-2979048975
More information about the valhalla-dev
mailing list