< prev index next >
src/hotspot/share/gc/shenandoah/shenandoahTraversalGC.cpp
Print this page
rev 49076 : Traversal: Initialize extra liveness arrays when conc-threads > par-threads
*** 208,217 ****
--- 208,223 ----
void work(uint worker_id) {
ShenandoahTraversalGC* traversal_gc = _heap->traversal_gc();
ShenandoahObjToScanQueueSet* queues = traversal_gc->task_queues();
ShenandoahObjToScanQueue* q = queues->queue(worker_id);
+ if (worker_id >= ShenandoahWorkerPolicy::prev_stw_traversal()) {
+ // Need to initialize extra work queue live data.
+ jushort* ld = _heap->traversal_gc()->get_liveness(worker_id);
+ Copy::fill_to_bytes(ld, _heap->num_regions() * sizeof(jushort));
+ }
+
// Drain all outstanding work in queues.
traversal_gc->main_loop(worker_id, _terminator, true);
}
};
< prev index next >