src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
Print this page
rev 6248 : imported patch fast-cset-uses-biasedarray
rev 6251 : 8028710: G1 does not retire allocation buffers after reference processing work
Summary: G1 does not retire allocation buffers after reference processing work when -XX:+ParallelRefProcEnabled is enabled.
Reviewed-by:
*** 4555,4565 ****
// Trying to keep some compilers happy.
return NULL;
}
G1ParGCAllocBuffer::G1ParGCAllocBuffer(size_t gclab_word_size) :
! ParGCAllocBuffer(gclab_word_size), _retired(false) { }
G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h, uint queue_num, ReferenceProcessor* rp)
: _g1h(g1h),
_refs(g1h->task_queue(queue_num)),
_dcq(&g1h->dirty_card_queue_set()),
--- 4555,4565 ----
// Trying to keep some compilers happy.
return NULL;
}
G1ParGCAllocBuffer::G1ParGCAllocBuffer(size_t gclab_word_size) :
! ParGCAllocBuffer(gclab_word_size), _retired(true) { }
G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h, uint queue_num, ReferenceProcessor* rp)
: _g1h(g1h),
_refs(g1h->task_queue(queue_num)),
_dcq(&g1h->dirty_card_queue_set()),
*** 4919,4930 ****
// available new entries on the queues. So we have to make sure
// we drain the queues as necessary.
pss->trim_queue();
}
} while (!offer_termination());
-
- pss->retire_alloc_buffers();
}
class G1KlassScanClosure : public KlassClosure {
G1ParCopyHelper* _closure;
bool _process_only_dirty;
--- 4919,4928 ----
*** 5746,5759 ****
&par_task_executor,
_gc_timer_stw);
}
_gc_tracer_stw->report_gc_reference_stats(stats);
! // We have completed copying any necessary live referent objects
! // (that were not copied during the actual pause) so we can
! // retire any active alloc buffers
! pss.retire_alloc_buffers();
assert(pss.refs()->is_empty(), "both queue and overflow should be empty");
double ref_proc_time = os::elapsedTime() - ref_proc_start;
g1_policy()->phase_times()->record_ref_proc_time(ref_proc_time * 1000.0);
}
--- 5744,5755 ----
&par_task_executor,
_gc_timer_stw);
}
_gc_tracer_stw->report_gc_reference_stats(stats);
!
! // We have completed copying any necessary live referent objects.
assert(pss.refs()->is_empty(), "both queue and overflow should be empty");
double ref_proc_time = os::elapsedTime() - ref_proc_start;
g1_policy()->phase_times()->record_ref_proc_time(ref_proc_time * 1000.0);
}