8222130: Shenandoah should verify roots after pre-evacuation
Reviewed-by: rkennke, zgu
This commit is contained in:
parent
ae463150c0
commit
3592b7ea78
@ -1547,6 +1547,10 @@ void ShenandoahHeap::op_final_mark() {
|
|||||||
if (ShenandoahPacing) {
|
if (ShenandoahPacing) {
|
||||||
pacer()->setup_for_evac();
|
pacer()->setup_for_evac();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ShenandoahVerify) {
|
||||||
|
verifier()->verify_during_evacuation();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (ShenandoahVerify) {
|
if (ShenandoahVerify) {
|
||||||
verifier()->verify_after_concmark();
|
verifier()->verify_after_concmark();
|
||||||
|
@ -628,6 +628,10 @@ void ShenandoahVerifier::verify_at_safepoint(const char *label,
|
|||||||
enabled = true;
|
enabled = true;
|
||||||
expected = ShenandoahHeap::HAS_FORWARDED;
|
expected = ShenandoahHeap::HAS_FORWARDED;
|
||||||
break;
|
break;
|
||||||
|
case _verify_gcstate_evacuation:
|
||||||
|
enabled = true;
|
||||||
|
expected = ShenandoahHeap::HAS_FORWARDED | ShenandoahHeap::EVACUATION;
|
||||||
|
break;
|
||||||
case _verify_gcstate_stable:
|
case _verify_gcstate_stable:
|
||||||
enabled = true;
|
enabled = true;
|
||||||
expected = ShenandoahHeap::STABLE;
|
expected = ShenandoahHeap::STABLE;
|
||||||
@ -808,6 +812,18 @@ 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_after_evacuation() {
|
void ShenandoahVerifier::verify_after_evacuation() {
|
||||||
verify_at_safepoint(
|
verify_at_safepoint(
|
||||||
"After Evacuation",
|
"After Evacuation",
|
||||||
|
@ -135,6 +135,9 @@ public:
|
|||||||
|
|
||||||
// Nothing is in progress, some objects are forwarded
|
// Nothing is in progress, some objects are forwarded
|
||||||
_verify_gcstate_forwarded,
|
_verify_gcstate_forwarded,
|
||||||
|
|
||||||
|
// Evacuation is in progress, some objects are forwarded
|
||||||
|
_verify_gcstate_evacuation,
|
||||||
} VerifyGCState;
|
} VerifyGCState;
|
||||||
|
|
||||||
struct VerifyOptions {
|
struct VerifyOptions {
|
||||||
@ -173,6 +176,7 @@ public:
|
|||||||
void verify_before_concmark();
|
void verify_before_concmark();
|
||||||
void verify_after_concmark();
|
void verify_after_concmark();
|
||||||
void verify_before_evacuation();
|
void verify_before_evacuation();
|
||||||
|
void verify_during_evacuation();
|
||||||
void verify_after_evacuation();
|
void verify_after_evacuation();
|
||||||
void verify_before_updaterefs();
|
void verify_before_updaterefs();
|
||||||
void verify_after_updaterefs();
|
void verify_after_updaterefs();
|
||||||
|
Loading…
Reference in New Issue
Block a user