< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahConcurrentMark.cpp
Print this page
@@ -230,11 +230,16 @@
// First drain remaining SATB buffers.
// Notice that this is not strictly necessary for mark-compact. But since
// it requires a StrongRootsScope around the task, we need to claim the
// threads, and performance-wise it doesn't really matter. Adds about 1ms to
// full-gc.
- _cm->drain_satb_buffers(worker_id);
+ ShenandoahObjToScanQueue* q = get_queue(worker_id);
+ ShenandoahSATBBufferClosure cl(q);
+ SATBMarkQueueSet& satb_mq_set = ShenandoahBarrierSet::satb_mark_queue_set();
+ while (satb_mq_set.apply_closure_to_completed_buffer(&cl));
+ ShenandoahSATBThreadsClosure tc(&cl);
+ Threads::threads_do(&tc);
ReferenceProcessor* rp;
if (_cm->process_references()) {
rp = ShenandoahHeap::heap()->ref_processor();
shenandoah_assert_rp_isalive_installed();
@@ -495,17 +500,10 @@
}
}
}
};
-void ShenandoahConcurrentMark::drain_satb_buffers(uint worker_id) {
- ShenandoahObjToScanQueue* q = get_queue(worker_id);
- ShenandoahSATBBufferClosure cl(q);
- ShenandoahSATBThreadsClosure tc(&cl);
- Threads::threads_do(&tc);
-}
-
#if TASKQUEUE_STATS
void ShenandoahConcurrentMark::print_taskqueue_stats_hdr(outputStream* const st) {
st->print_raw_cr("GC Task Stats");
st->print_raw("thr "); TaskQueueStats::print_header(1, st); st->cr();
st->print_raw("--- "); TaskQueueStats::print_header(2, st); st->cr();
< prev index next >