src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
Print this page
@@ -1116,11 +1116,12 @@
// allocation, P-bits, when available, may be used to determine the
// size of an object that may not yet have been initialized.
// Things to support parallel young-gen collection.
oop
-ConcurrentMarkSweepGeneration::par_promote(int thread_num,
+ConcurrentMarkSweepGeneration::par_promote(const ParNewTracer* gc_tracer,
+ int thread_num,
oop old, markOop m,
size_t word_sz) {
#ifndef PRODUCT
if (Universe::heap()->promotion_should_fail()) {
return NULL;
@@ -1142,13 +1143,13 @@
return NULL;
}
}
assert(promoInfo->has_spooling_space(), "Control point invariant");
const size_t alloc_sz = CompactibleFreeListSpace::adjustObjectSize(word_sz);
- HeapWord* obj_ptr = ps->lab.alloc(alloc_sz);
+ HeapWord* obj_ptr = ps->lab.alloc(gc_tracer, alloc_sz, old, m);
if (obj_ptr == NULL) {
- obj_ptr = expand_and_par_lab_allocate(ps, alloc_sz);
+ obj_ptr = expand_and_par_lab_allocate(ps, gc_tracer, alloc_sz, old, m);
if (obj_ptr == NULL) {
return NULL;
}
}
oop obj = oop(obj_ptr);
@@ -3112,16 +3113,19 @@
CMSExpansionCause::to_string(cause));
}
}
}
-HeapWord* ConcurrentMarkSweepGeneration::expand_and_par_lab_allocate(CMSParGCThreadState* ps, size_t word_sz) {
+HeapWord* ConcurrentMarkSweepGeneration::expand_and_par_lab_allocate(CMSParGCThreadState* ps,
+ const ParNewTracer* gc_tracer,
+ size_t word_sz,
+ const oop old, const markOop m) {
HeapWord* res = NULL;
MutexLocker x(ParGCRareEvent_lock);
while (true) {
// Expansion by some other thread might make alloc OK now:
- res = ps->lab.alloc(word_sz);
+ res = ps->lab.alloc(gc_tracer, word_sz, old, m);
if (res != NULL) return res;
// If there's not enough expansion space available, give up.
if (_virtual_space.uncommitted_size() < (word_sz * HeapWordSize)) {
return NULL;
}