8338662: Shenandoah: Remove excessive ShenandoahVerifier::verify_during_evacuation

Reviewed-by: wkemper, ysr
This commit is contained in:
Aleksey Shipilev 2024-08-22 11:39:47 +00:00
parent 129f527f4f
commit 6cf7f9c4a7
4 changed files with 5 additions and 35 deletions

View File

@ -613,12 +613,6 @@ void ShenandoahConcurrentGC::op_final_mark() {
// From here on, we need to update references.
heap->set_has_forwarded_objects(true);
// Verify before arming for concurrent processing.
// Otherwise, verification can trigger stack processing.
if (ShenandoahVerify) {
heap->verifier()->verify_during_evacuation();
}
// Arm nmethods/stack for concurrent processing
ShenandoahCodeRoots::arm_nmethods_for_evac();
ShenandoahStackWatermark::change_epoch_id();

View File

@ -276,12 +276,12 @@ void ShenandoahDegenGC::op_prepare_evacuation() {
}
if (!heap->collection_set()->is_empty()) {
if (ShenandoahVerify) {
heap->verifier()->verify_before_evacuation();
}
heap->set_evacuation_in_progress(true);
heap->set_has_forwarded_objects(true);
if(ShenandoahVerify) {
heap->verifier()->verify_during_evacuation();
}
} else {
if (ShenandoahVerify) {
heap->verifier()->verify_after_concmark();

View File

@ -661,14 +661,6 @@ void ShenandoahVerifier::verify_at_safepoint(const char *label,
enabled = true;
expected = ShenandoahHeap::HAS_FORWARDED;
break;
case _verify_gcstate_evacuation:
enabled = true;
expected = ShenandoahHeap::HAS_FORWARDED | ShenandoahHeap::EVACUATION;
if (!_heap->is_stw_gc_in_progress()) {
// Only concurrent GC sets this.
expected |= ShenandoahHeap::WEAK_ROOTS;
}
break;
case _verify_gcstate_stable:
enabled = true;
expected = ShenandoahHeap::STABLE;
@ -851,18 +843,6 @@ void ShenandoahVerifier::verify_before_evacuation() {
);
}
void ShenandoahVerifier::verify_during_evacuation() {
verify_at_safepoint(
"During Evacuation",
_verify_forwarded_allow, // some forwarded references are allowed
_verify_marked_disable, // walk only roots
_verify_cset_disable, // some cset references are not forwarded yet
_verify_liveness_disable, // liveness data might be already stale after pre-evacs
_verify_regions_disable, // trash regions not yet recycled
_verify_gcstate_evacuation // evacuation is in progress
);
}
void ShenandoahVerifier::verify_before_updaterefs() {
verify_at_safepoint(
"Before Updating References",

View File

@ -133,10 +133,7 @@ public:
_verify_gcstate_stable_weakroots,
// Nothing is in progress, some objects are forwarded
_verify_gcstate_forwarded,
// Evacuation is in progress, some objects are forwarded
_verify_gcstate_evacuation
_verify_gcstate_forwarded
} VerifyGCState;
struct VerifyOptions {
@ -175,7 +172,6 @@ public:
void verify_before_concmark();
void verify_after_concmark();
void verify_before_evacuation();
void verify_during_evacuation();
void verify_before_updaterefs();
void verify_after_updaterefs();
void verify_before_fullgc();