RFR(XXS) 8224525: Shenandoah: Eliminate shenandoah verifier's side-effects
Aleksey Shipilev
shade at redhat.com
Tue May 21 21:23:05 UTC 2019
On 5/21/19 10:57 PM, Zhengyu Gu wrote:
> Since switching to LRB, verifier has side-effects of evacuating oops, if it is ran during evacuation
> phase.
>
> The patch resets gc_state before LRB can be triggered by verifier, and restore gc_state when it is
> done.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8224525
> Webrev: http://cr.openjdk.java.net/~zgu/JDK-8224525/webrev.00/
>
> Test:
> hotspot_gc_shenandoah with -XX:+ShenandoahVerify (fastdebug and release)
The idea looks good.
Let's put the comment like:
672 // Deactivate barriers temporarily: Verifier wants plain heap accesses
673 ShenandoahGCStateResetter resetter;
You can common the use of ShenandoahHeap::heap() here (in fact you can probably just pull it into
the ShenandoahGCStateResetter const field):
618 ~ShenandoahGCStateResetter() {
619 ShenandoahHeap::heap()->_gc_state.set(_gc_state);
620 assert(ShenandoahHeap::heap()->gc_state() == _gc_state, "Should be restored");
621 }
-Aleksey
More information about the shenandoah-dev
mailing list