7199349: NPG: PS: Crash seen in jprt

Reviewed-by: johnc
This commit is contained in:
Jon Masamitsu 2012-10-03 08:08:52 -07:00
parent 7ccbee4177
commit 88ab075a6d
7 changed files with 38 additions and 150 deletions

View file

@ -136,6 +136,13 @@ oop PSPromotionManager::copy_to_survivor_space(oop o) {
HeapWord* lab_base = old_gen()->cas_allocate(OldPLABSize);
if(lab_base != NULL) {
#ifdef ASSERT
// Delay the initialization of the promotion lab (plab).
// This exposes uninitialized plabs to card table processing.
if (GCWorkerDelayMillis > 0) {
os::sleep(Thread::current(), GCWorkerDelayMillis, false);
}
#endif
_old_lab.initialize(MemRegion(lab_base, OldPLABSize));
// Try the old lab allocation again.
new_obj = (oop) _old_lab.allocate(new_obj_size);