Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 8855:24ef5fb05e0f
8010463: G1: Crashes with -UseTLAB and heap verification
Summary: 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
author | johnc |
---|---|
date | Fri, 29 Mar 2013 13:49:37 -0700 |
parents | 2e093b564241 |
children | b9a918201d47 7b835924c31c 71013d764f6e |
comparison
equal
deleted
inserted
replaced
8854:754c24457b20 | 8855:24ef5fb05e0f |
---|---|
3286 verify(silent, VerifyOption_G1UsePrevMarking); | 3286 verify(silent, VerifyOption_G1UsePrevMarking); |
3287 } | 3287 } |
3288 | 3288 |
3289 void G1CollectedHeap::verify(bool silent, | 3289 void G1CollectedHeap::verify(bool silent, |
3290 VerifyOption vo) { | 3290 VerifyOption vo) { |
3291 if (SafepointSynchronize::is_at_safepoint() || ! UseTLAB) { | 3291 if (SafepointSynchronize::is_at_safepoint()) { |
3292 if (!silent) { gclog_or_tty->print("Roots "); } | 3292 if (!silent) { gclog_or_tty->print("Roots "); } |
3293 VerifyRootsClosure rootsCl(vo); | 3293 VerifyRootsClosure rootsCl(vo); |
3294 | 3294 |
3295 assert(Thread::current()->is_VM_thread(), | 3295 assert(Thread::current()->is_VM_thread(), |
3296 "Expected to be executed serially by the VM thread at this point"); | 3296 "Expected to be executed serially by the VM thread at this point"); |
3297 | 3297 |
3298 CodeBlobToOopClosure blobsCl(&rootsCl, /*do_marking=*/ false); | 3298 CodeBlobToOopClosure blobsCl(&rootsCl, /*do_marking=*/ false); |
3299 VerifyKlassClosure klassCl(this, &rootsCl); | 3299 VerifyKlassClosure klassCl(this, &rootsCl); |
3300 | 3300 |
3301 // We apply the relevant closures to all the oops in the | 3301 // We apply the relevant closures to all the oops in the |
3376 #endif | 3376 #endif |
3377 gclog_or_tty->flush(); | 3377 gclog_or_tty->flush(); |
3378 } | 3378 } |
3379 guarantee(!failures, "there should not have been any failures"); | 3379 guarantee(!failures, "there should not have been any failures"); |
3380 } else { | 3380 } else { |
3381 if (!silent) gclog_or_tty->print("(SKIPPING roots, heapRegions, remset) "); | 3381 if (!silent) |
3382 gclog_or_tty->print("(SKIPPING roots, heapRegionSets, heapRegions, remset) "); | |
3382 } | 3383 } |
3383 } | 3384 } |
3384 | 3385 |
3385 class PrintRegionClosure: public HeapRegionClosure { | 3386 class PrintRegionClosure: public HeapRegionClosure { |
3386 outputStream* _st; | 3387 outputStream* _st; |