Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8246458: Shenandoah: TestAllocObjects.java test fail with -XX:+Shenan…
…doahVerify

Reviewed-by: shade
  • Loading branch information
zhengyu123 committed Jun 3, 2020
1 parent f1e1cb7 commit d9fc44540e84a30690f0cba0a0d95bd051e9b2af
Showing with 12 additions and 9 deletions.
  1. +12 −9 src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
@@ -1589,17 +1589,20 @@ void ShenandoahHeap::op_final_mark() {
}

if (ShenandoahVerify) {
ShenandoahRootVerifier::RootTypes types = ShenandoahRootVerifier::None;
if (ShenandoahConcurrentRoots::should_do_concurrent_roots()) {
types = ShenandoahRootVerifier::combine(ShenandoahRootVerifier::JNIHandleRoots, ShenandoahRootVerifier::WeakRoots);
types = ShenandoahRootVerifier::combine(types, ShenandoahRootVerifier::CLDGRoots);
types = ShenandoahRootVerifier::combine(types, ShenandoahRootVerifier::StringDedupRoots);
}
// If OOM while evacuating/updating of roots, there is no guarantee of their consistencies
if (!cancelled_gc()) {
ShenandoahRootVerifier::RootTypes types = ShenandoahRootVerifier::None;
if (ShenandoahConcurrentRoots::should_do_concurrent_roots()) {
types = ShenandoahRootVerifier::combine(ShenandoahRootVerifier::JNIHandleRoots, ShenandoahRootVerifier::WeakRoots);
types = ShenandoahRootVerifier::combine(types, ShenandoahRootVerifier::CLDGRoots);
types = ShenandoahRootVerifier::combine(types, ShenandoahRootVerifier::StringDedupRoots);
}

if (ShenandoahConcurrentRoots::should_do_concurrent_class_unloading()) {
types = ShenandoahRootVerifier::combine(types, ShenandoahRootVerifier::CodeRoots);
if (ShenandoahConcurrentRoots::should_do_concurrent_class_unloading()) {
types = ShenandoahRootVerifier::combine(types, ShenandoahRootVerifier::CodeRoots);
}
verifier()->verify_roots_no_forwarded_except(types);
}
verifier()->verify_roots_no_forwarded_except(types);
verifier()->verify_during_evacuation();
}
} else {

0 comments on commit d9fc445

Please sign in to comment.