RFR: Generic verification should not trust bitmaps
Zhengyu Gu
zgu at redhat.com
Mon Jun 12 16:43:16 UTC 2017
Okay.
-Zhengyu
On 06/12/2017 11:09 AM, Aleksey Shipilev wrote:
> There is a path to verification via Universe::verify(). Before today, we thought
> it is a sane idea to piggyback on G1 Mark* constants to select which bitmap to
> trust. But it turns out, we can call verification on VM exit when either CM or
> UR were cancelled, and thus we cannot trust bitmaps.
>
> The solution is to be more conservative there:
>
> $ hg diff
> diff -r e06be1d290c4 src/share/vm/gc/shenandoah/shenandoahVerifier.cpp
> --- a/src/share/vm/gc/shenandoah/shenandoahVerifier.cpp Thu Jun 08 19:37:46 2017
> +0200
> +++ b/src/share/vm/gc/shenandoah/shenandoahVerifier.cpp Mon Jun 12 17:06:19 2017
> +0200
> @@ -342,27 +342,10 @@
> }
>
> void ShenandoahVerifier::verify_generic(VerifyOption vo) {
> - // _vo == UsePrevMarking -> use "prev" marking information,
> - // _vo == UseNextMarking -> use "next" marking information,
> - // _vo == UseMarkWord -> use mark word from object header.
> -
> - VerifyMarked mark_verify;
> - switch (vo) {
> - case VerifyOption_G1UsePrevMarking:
> - mark_verify = _verify_marked_complete;
> - break;
> - case VerifyOption_G1UseNextMarking:
> - mark_verify = _verify_marked_next;
> - break;
> - default:
> - mark_verify = _verify_marked_disable;
> - break;
> - }
> -
> verify_reachable_at_safepoint(
> "Generic Verification",
> _verify_forwarded_allow, // conservatively allow forwarded
> - mark_verify, // (selector above)
> + _verify_marked_disable, // cannot trust bitmaps here
> _verify_matrix_disable, // matrix can be inconsistent here
> _verify_cset_disable // cset may be inconsistent
> );
>
> Testing: hotspot_gc_shenandoah, jcstress -m quick
>
> Thanks,
> -Aleksey
>
More information about the shenandoah-dev
mailing list