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

@ -953,15 +953,6 @@ void Universe::update_heap_info_at_gc() {
void universe2_init() {
EXCEPTION_MARK;
Universe::genesis(CATCH);
// Although we'd like to verify here that the state of the heap
// is good, we can't because the main thread has not yet added
// itself to the threads list (so, using current interfaces
// we can't "fill" its TLAB), unless TLABs are disabled.
if (VerifyBeforeGC && !UseTLAB &&
Universe::heap()->total_collections() >= VerifyGCStartAt) {
Universe::heap()->prepare_for_verify();
Universe::verify(); // make sure we're starting with a clean slate
}
}