Mercurial > hg > graal-compiler
diff src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 1861:c32059ef4dc0
6971296: G1: simplify G1RemSet class hierarchy
Summary: Remove G1RemSet base class and StupidG1RemSet class; rename HRInto_G1RemSet to just G1RemSet.
Reviewed-by: ysr, tonyp
author | johnc |
---|---|
date | Tue, 12 Oct 2010 09:36:48 -0700 |
parents | 4e0094bc41fa |
children | b14ec34b1e07 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Oct 08 09:29:09 2010 -0700 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Tue Oct 12 09:36:48 2010 -0700 @@ -791,7 +791,7 @@ int _worker_i; public: RebuildRSOutOfRegionClosure(G1CollectedHeap* g1, int worker_i = 0) : - _cl(g1->g1_rem_set()->as_HRInto_G1RemSet(), worker_i), + _cl(g1->g1_rem_set(), worker_i), _worker_i(worker_i), _g1h(g1) { } @@ -890,7 +890,7 @@ abandon_cur_alloc_region(); abandon_gc_alloc_regions(); assert(_cur_alloc_region == NULL, "Invariant."); - g1_rem_set()->as_HRInto_G1RemSet()->cleanupHRRS(); + g1_rem_set()->cleanupHRRS(); tear_down_region_lists(); set_used_regions_to_need_zero_fill(); @@ -1506,15 +1506,11 @@ } // Also create a G1 rem set. - if (G1UseHRIntoRS) { - if (mr_bs()->is_a(BarrierSet::CardTableModRef)) { - _g1_rem_set = new HRInto_G1RemSet(this, (CardTableModRefBS*)mr_bs()); - } else { - vm_exit_during_initialization("G1 requires a cardtable mod ref bs."); - return JNI_ENOMEM; - } + if (mr_bs()->is_a(BarrierSet::CardTableModRef)) { + _g1_rem_set = new G1RemSet(this, (CardTableModRefBS*)mr_bs()); } else { - _g1_rem_set = new StupidG1RemSet(this); + vm_exit_during_initialization("G1 requires a cardtable mod ref bs."); + return JNI_ENOMEM; } // Carve out the G1 part of the heap. @@ -2706,8 +2702,7 @@ } size_t G1CollectedHeap::cards_scanned() { - HRInto_G1RemSet* g1_rset = (HRInto_G1RemSet*) g1_rem_set(); - return g1_rset->cardsScanned(); + return g1_rem_set()->cardsScanned(); } void