RFR: 8256999: Add C2 intrinsic for Reference.refersTo and PhantomReference::refersTo

Aleksey Shipilev shade at openjdk.java.net
Wed Nov 25 19:51:59 UTC 2020


On Wed, 25 Nov 2020 17:48:54 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> @shipilev 2 new tests added by JDK-8188055 does not trigger C2 compilation.

That sounds like a testbug to me! Since this PR adds C2 intrinsics, I thought it is expected that new tests trigger it in default test configs...

> 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
> #

Right. So new intrinsic introduces the "phantom" access from C2 intrinsic code, and it can be narrow. Shenandoah did not handle that path, because no existing code shapes were exercising it, and it was considered dead. Since it is not dead now, we can simply implement that part like this: http://cr.openjdk.java.net/~shade/shenandoah/8256999-shenandoah-fix.patch.

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

PR: https://git.openjdk.java.net/jdk/pull/1425


More information about the core-libs-dev mailing list