Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 1883:35e4e086d5f5
6990359: G1: don't push a stolen entry on the taskqueue, deal with it directly
Summary: When an entry is stolen, don't push it on the task queue but process it directly.
Reviewed-by: iveresov, ysr, jcoomes
author | tonyp |
---|---|
date | Thu, 14 Oct 2010 10:38:14 -0400 |
parents | b14ec34b1e07 |
children | 878b57474103 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Tue Oct 12 11:29:45 2010 -0700 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Thu Oct 14 10:38:14 2010 -0400 @@ -4118,10 +4118,14 @@ while (queues()->steal(pss->queue_num(), pss->hash_seed(), stolen_task)) { assert(pss->verify_task(stolen_task), "sanity"); if (stolen_task.is_narrow()) { - pss->push_on_queue((narrowOop*) stolen_task); + pss->deal_with_reference((narrowOop*) stolen_task); } else { - pss->push_on_queue((oop*) stolen_task); + pss->deal_with_reference((oop*) stolen_task); } + + // We've just processed a reference and we might have made + // available new entries on the queues. So we have to make sure + // we drain the queues as necessary. pss->trim_queue(); } } while (!offer_termination());