index

src/share/vm/gc_implementation/parNew/parNewGeneration.cpp

Print this page
rev 8156 : [mq]: 8066444

*** 218,232 **** assert(ParGCUseLocalOverflow, "Else should not call"); overflow_stack()->push(p); assert(young_gen()->overflow_list() == NULL, "Error"); } ! HeapWord* ParScanThreadState::alloc_in_to_space_slow(size_t word_sz) { // Otherwise, if the object is small enough, try to reallocate the // buffer. HeapWord* obj = NULL; if (!_to_space_full) { PLAB* const plab = to_space_alloc_buffer(); Space* const sp = to_space(); if (word_sz * 100 < ParallelGCBufferWastePct * plab->word_sz()) { --- 218,233 ---- assert(ParGCUseLocalOverflow, "Else should not call"); overflow_stack()->push(p); assert(young_gen()->overflow_list() == NULL, "Error"); } ! HeapWord* ParScanThreadState::alloc_in_to_space_slow(size_t word_sz, oop old, uint age) { // Otherwise, if the object is small enough, try to reallocate the // buffer. HeapWord* obj = NULL; + const ParNewTracer* gc_tracer = _young_gen->gc_tracer(); if (!_to_space_full) { PLAB* const plab = to_space_alloc_buffer(); Space* const sp = to_space(); if (word_sz * 100 < ParallelGCBufferWastePct * plab->word_sz()) {
*** 249,258 **** --- 250,265 ---- if (buf_space != NULL) { plab->set_word_size(buf_size); plab->set_buf(buf_space); record_survivor_plab(buf_space, buf_size); obj = plab->allocate_aligned(word_sz, SurvivorAlignmentInBytes); + if (obj != NULL && gc_tracer->should_report_promotion_in_new_plab_event()) { + size_t obj_bytes = word_sz * HeapWordSize; + size_t plab_bytes = buf_size * HeapWordSize; + gc_tracer->report_promotion_in_new_plab_event(old->klass(), obj_bytes, + age, false, plab_bytes); + } // Note that we cannot compare buf_size < word_sz below // because of AlignmentReserve (see PLAB::allocate()). assert(obj != NULL || plab->words_remaining() < word_sz, "Else should have been able to allocate"); // It's conceivable that we may be able to use the
*** 264,273 **** --- 271,285 ---- } } else { // Too large; allocate the object individually. obj = sp->par_allocate(word_sz); + if (obj != NULL && gc_tracer->should_report_promotion_outside_plab_event()) { + size_t obj_bytes = word_sz * HeapWordSize; + gc_tracer->report_promotion_outside_plab_event(old->klass(), obj_bytes, + age, false); + } } } return obj; }
*** 1148,1158 **** oop new_obj = NULL; oop forward_ptr; // Try allocating obj in to-space (unless too old) if (dummyOld.age() < tenuring_threshold()) { ! new_obj = (oop)par_scan_state->alloc_in_to_space(sz); if (new_obj == NULL) { set_survivor_overflow(true); } } --- 1160,1170 ---- oop new_obj = NULL; oop forward_ptr; // Try allocating obj in to-space (unless too old) if (dummyOld.age() < tenuring_threshold()) { ! new_obj = (oop)par_scan_state->alloc_in_to_space(sz, old, dummyOld.age()); if (new_obj == NULL) { set_survivor_overflow(true); } }
index