--- old/src/share/vm/gc/shenandoah/shenandoahMarkCompact.cpp 2017-03-15 14:00:41.534683956 +0100 +++ new/src/share/vm/gc/shenandoah/shenandoahMarkCompact.cpp 2017-03-15 14:00:41.482684094 +0100 @@ -317,9 +317,10 @@ outputStream* log = Log(gc)::info_stream(); _heap->connection_matrix()->print_on(log); } - if (VerifyShenandoahMatrix) { - _heap->verify_matrix(); - } + } + + if (ShenandoahVerify || (UseShenandoahMatrix && VerifyShenandoahMatrix)) { + _heap->verify_heap_reachable_at_safepoint(); } if (VerifyDuringGC) {