Mercurial > hg > truffle
diff src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp @ 6948:e522a00b91aa
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 12 Nov 2012 23:14:12 +0100 |
parents | 22b8d3d181d9 |
children | 47bdfb3d010f d2907f74462e |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp Mon Nov 12 18:11:17 2012 +0100 +++ b/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp Mon Nov 12 23:14:12 2012 +0100 @@ -85,7 +85,7 @@ if (!promote_immediately) { // Find the objects age, MT safe. - int age = (test_mark->has_displaced_mark_helper() /* o->has_displaced_mark() */) ? + uint age = (test_mark->has_displaced_mark_helper() /* o->has_displaced_mark() */) ? test_mark->displaced_mark_helper()->age() : test_mark->age(); // Try allocating obj in to-space (unless too old) @@ -136,6 +136,13 @@ 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); @@ -212,13 +219,13 @@ new_obj = o->forwardee(); } -#ifdef DEBUG +#ifndef PRODUCT // This code must come after the CAS test, or it will print incorrect // information. if (TraceScavenge) { - gclog_or_tty->print_cr("{%s %s " PTR_FORMAT " -> " PTR_FORMAT " (" SIZE_FORMAT ")}", + gclog_or_tty->print_cr("{%s %s " PTR_FORMAT " -> " PTR_FORMAT " (%d)}", PSScavenge::should_scavenge(&new_obj) ? "copying" : "tenuring", - new_obj->blueprint()->internal_name(), o, new_obj, new_obj->size()); + new_obj->klass()->internal_name(), o, new_obj, new_obj->size()); } #endif