RFR: Missing JNI Weak Refs handling after JDK-8189359

Roman Kennke rkennke at redhat.com
Wed Feb 7 11:38:28 UTC 2018


Am 07.02.2018 um 12:07 schrieb Aleksey Shipilev:
> http://cr.openjdk.java.net/~shade/shenandoah/weakjni-process/webrev.01/
> 
> sh/jdk10 had regressed JNI Weak Refs after we accepted JDK-8189359 [1] from upstream. This seems to
> be the cause of the failure Lennart sees here:
>    http://mail.openjdk.java.net/pipermail/shenandoah-dev/2018-February/004883.html
> 
> The failure goes like this. With concurrent mark that processes references, we skip marking weak
> references, which includes JNI Weak Refs. At final mark, we would go to reference processor which is
> supposed to complete the mark, including JNI Weak Refs. That is, it used to do that, until
> JDK-8189369 moved it out of ReferenceProcessor.
> 
> The fix is to call the same new WeakProcessor other GCs are calling now. It seems to require
> mechanically changing JNIHandles::weak_oops_do to WeakProcessor::oops_do, and calling
> WeakProcessor::weak_oops_do in the same context where we process references.
> 
> Testing: hotspot_gc_shenandoah, new test

Looks good.

Roman

-- 
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.


More information about the shenandoah-dev mailing list