8010463: G1: Crashes with -UseTLAB and heap verification

Some parts of the G1 heap can only be walked during a safepoint. Skip verifying these parts of the heap when verifying during JVM startup.

Reviewed-by: brutisso, tschatzl
This commit is contained in:
John Cuthbertson 2013-03-29 13:49:37 -07:00
parent bb5bd507d7
commit 9c89e6d28a
5 changed files with 54 additions and 27 deletions

View file

@ -3423,12 +3423,6 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
// real raw monitor. VM is setup enough here for raw monitor enter.
JvmtiExport::transition_pending_onload_raw_monitors();
if (VerifyBeforeGC &&
Universe::heap()->total_collections() >= VerifyGCStartAt) {
Universe::heap()->prepare_for_verify();
Universe::verify(); // make sure we're starting with a clean slate
}
// Fully start NMT
MemTracker::start();
@ -3452,6 +3446,11 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
}
assert (Universe::is_fully_initialized(), "not initialized");
if (VerifyBeforeGC && VerifyGCStartAt == 0) {
Universe::heap()->prepare_for_verify();
Universe::verify(); // make sure we're starting with a clean slate
}
EXCEPTION_MARK;
// At this point, the Universe is initialized, but we have not executed