RFR/RFC [8u]: Enable weak JNI handling with Shenandoah after JDK-8176100
Roman Kennke
rkennke at redhat.com
Mon May 27 13:29:11 UTC 2019
Looks like we've got a clash between rscratch1 used in
g1_write_barrier_pre() and the rscratch that's passed as tmp from
sharedRuntime_aarch64.cpp. You need this fix:
diff -r 9f523f185755 src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp
--- a/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp Mon May 27 12:23:24
2019 +0200
+++ b/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp Mon May 27 09:27:22
2019 -0400
@@ -2066,7 +2066,7 @@
__ g1_write_barrier_pre(noreg /* obj */,
r0 /* pre_val */,
rthread /* thread */,
- rscratch1 /* tmp */,
+ rscratch2 /* tmp */,
true /* tosca_live */,
true /* expand_call */);
}
This makes the failing test pass for me.
It probably warrants a more careful fix, extra asserts in
g1_write_barrier_pre() and checking if newer versions have similar problems.
Roman
> In Shenandoah/jdk8u code, we have a workaround for weak JNI handling:
> http://hg.openjdk.java.net/shenandoah/jdk8/hotspot/rev/119e9a5b24d5
> http://hg.openjdk.java.net/shenandoah/jdk8/hotspot/rev/d305c31da9f5
>
> This workaround is not necessary anymore, after we got the backports of JDK-8176100:
> http://hg.openjdk.java.net/shenandoah/jdk8/hotspot/rev/32bc598624bd
> http://hg.openjdk.java.net/shenandoah/jdk8/hotspot/rev/327f9583546e
>
> So, this changeset rolls back the workaround and injects Shenandoah calls where appropriate.
>
> 8u candidate fix:
> http://cr.openjdk.java.net/~shade/shenandoah/8u-enable-weak-jni/webrev.01/
>
> Note aarch64 fails! This might mean the upstream patch is incomplete. And I cannot debug it properly
> without having working aarch64 machine.
>
> Testing: hotspot_gc_shenandoah (includes gc/shenandoah/jni/TestJNIGlobalRefs.sh
> test that fails without the workaround, and passes again without the workaround _and_ the fixes in
> platform-specific code); tested with x86_64
>
More information about the shenandoah-dev
mailing list