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

@ -132,15 +132,6 @@ jint init_globals() {
javaClasses_init(); // must happen after vtable initialization
stubRoutines_init2(); // note: StubRoutines need 2-phase init
// Although we'd like to, we can't easily do a heap verify
// here because the main thread isn't yet a JavaThread, so
// its TLAB may not be made parseable from the usual interfaces.
if (VerifyBeforeGC && !UseTLAB &&
Universe::heap()->total_collections() >= VerifyGCStartAt) {
Universe::heap()->prepare_for_verify();
Universe::verify(); // make sure we're starting with a clean slate
}
// All the flags that get adjusted by VM_Version_init and os::init_2
// have been set so dump the flags now.
if (PrintFlagsFinal) {