6990359: G1: don't push a stolen entry on the taskqueue, deal with it directly

Thu, 14 Oct 2010 10:38:14 -0400

author
tonyp
date
Thu, 14 Oct 2010 10:38:14 -0400
changeset 2238
35e4e086d5f5
parent 2217
b14ec34b1e07
child 2239
9f4848ebbabd

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

src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Tue Oct 12 11:29:45 2010 -0700
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Oct 14 10:38:14 2010 -0400
     1.3 @@ -4118,10 +4118,14 @@
     1.4      while (queues()->steal(pss->queue_num(), pss->hash_seed(), stolen_task)) {
     1.5        assert(pss->verify_task(stolen_task), "sanity");
     1.6        if (stolen_task.is_narrow()) {
     1.7 -        pss->push_on_queue((narrowOop*) stolen_task);
     1.8 +        pss->deal_with_reference((narrowOop*) stolen_task);
     1.9        } else {
    1.10 -        pss->push_on_queue((oop*) stolen_task);
    1.11 +        pss->deal_with_reference((oop*) stolen_task);
    1.12        }
    1.13 +
    1.14 +      // We've just processed a reference and we might have made
    1.15 +      // available new entries on the queues. So we have to make sure
    1.16 +      // we drain the queues as necessary.
    1.17        pss->trim_queue();
    1.18      }
    1.19    } while (!offer_termination());
     2.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Tue Oct 12 11:29:45 2010 -0700
     2.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Thu Oct 14 10:38:14 2010 -0400
     2.3 @@ -1772,7 +1772,6 @@
     2.4      }
     2.5    }
     2.6  
     2.7 -private:
     2.8    template <class T> void deal_with_reference(T* ref_to_scan) {
     2.9      if (has_partial_array_mask(ref_to_scan)) {
    2.10        _partial_scan_cl->do_oop_nv(ref_to_scan);

mercurial