< prev index next >

src/share/vm/gc/shenandoah/shenandoahConcurrentMark.cpp

Print this page
rev 12191 : Improve handling of cancelled-gc flag.

*** 880,897 **** uint worker_id, SCMObjToScanQueue* q, ParallelTaskTerminator* terminator) { ShenandoahHeap* heap = ShenandoahHeap::heap(); int seed = 17; while (true) { ! if (heap->cancelled_concgc()) clear_queue(q); ! if (heap->cancelled_concgc() || ! (!try_queue(q, cl) && !try_draining_an_satb_buffer(q) && ! !try_to_steal(worker_id, cl, &seed)) ) { ! if (terminator->offer_termination()) break; } } } template <class T, bool CL> --- 880,903 ---- uint worker_id, SCMObjToScanQueue* q, ParallelTaskTerminator* terminator) { ShenandoahHeap* heap = ShenandoahHeap::heap(); int seed = 17; + uint stride = ShenandoahMarkLoopStride; while (true) { ! if (heap->cancelled_concgc()) { ! clear_queue(q); ! while (! terminator->offer_termination()); ! return; ! } ! for (uint i = 0; i < stride; i++) { ! if (!try_queue(q, cl) && !try_draining_an_satb_buffer(q) && ! !try_to_steal(worker_id, cl, &seed) ) { ! if (terminator->offer_termination()) return; ! } } } } template <class T, bool CL>
< prev index next >