RFR: 8256999: Add C2 intrinsic for Reference.refersTo and PhantomReference::refersTo
Vladimir Kozlov
kvn at openjdk.java.net
Wed Nov 25 17:51:59 UTC 2020
On Wed, 25 Nov 2020 11:09:05 GMT, Per Liden <pliden at openjdk.org> wrote:
>> JDK-8188055 added the function Reference.refersTo. For performance, the supporting native methods Reference.refersTo0 and PhantomReference.refersTo0 should be intrinsified by C2.
>>
>> Initial patch was prepared by @fisk.
>>
>> Tested hs-tier1-4. Added new compiler tests to test intrinsics.
>>
>> Ran new test with Shenandoah. Found only one issue. As result I disable PhantomReference::refersTo intrinsic for COOP+ Shenandoah combination. Someone from Shenandoah team have to test changes if that is enough.
>
> ZGC changes look good!
> I just pulled the fresh master, applied this patch on top, enabled `_PhantomReference_refersTo0` in `c2compiler.cpp`, and ran `CONF=linux-x86_64-server-fastdebug make images run-test TEST=tier1 TEST_VM_OPTS="-XX:+UseShenandoahGC"` without problems.
>
> @vnkozlov, what Shenandoah failure did you see? Attention @rkennke.
@shipilev 2 new tests added by JDK-8188055 does not trigger C2 compilation.
You need to run my new test to trigger problem I see:
java -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+UseShenandoahGC TestReferenceRefersTo.java
# Internal Error (/open/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp:999), pid=2498681, tid=2498694
# assert(!is_narrow) failed: phantom access cannot be narrow
#
# JRE version: Java(TM) SE Runtime Environment (16.0) (fastdebug build 16-internal+0-2020-11-24)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 16-internal+0-2020-11-24, mixed mode, sharing, compressed oops, shenandoah gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x1862090] ShenandoahBarrierC2Support::call_lrb_stub(Node*&, Node*&, Node*, Node*&, Node*, unsigned long, PhaseIdealLoop*)+0x7e0
-------------
PR: https://git.openjdk.java.net/jdk/pull/1425
More information about the core-libs-dev
mailing list