1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri Oct 08 09:29:09 2010 -0700 1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Tue Oct 12 09:36:48 2010 -0700 1.3 @@ -791,7 +791,7 @@ 1.4 int _worker_i; 1.5 public: 1.6 RebuildRSOutOfRegionClosure(G1CollectedHeap* g1, int worker_i = 0) : 1.7 - _cl(g1->g1_rem_set()->as_HRInto_G1RemSet(), worker_i), 1.8 + _cl(g1->g1_rem_set(), worker_i), 1.9 _worker_i(worker_i), 1.10 _g1h(g1) 1.11 { } 1.12 @@ -890,7 +890,7 @@ 1.13 abandon_cur_alloc_region(); 1.14 abandon_gc_alloc_regions(); 1.15 assert(_cur_alloc_region == NULL, "Invariant."); 1.16 - g1_rem_set()->as_HRInto_G1RemSet()->cleanupHRRS(); 1.17 + g1_rem_set()->cleanupHRRS(); 1.18 tear_down_region_lists(); 1.19 set_used_regions_to_need_zero_fill(); 1.20 1.21 @@ -1506,15 +1506,11 @@ 1.22 } 1.23 1.24 // Also create a G1 rem set. 1.25 - if (G1UseHRIntoRS) { 1.26 - if (mr_bs()->is_a(BarrierSet::CardTableModRef)) { 1.27 - _g1_rem_set = new HRInto_G1RemSet(this, (CardTableModRefBS*)mr_bs()); 1.28 - } else { 1.29 - vm_exit_during_initialization("G1 requires a cardtable mod ref bs."); 1.30 - return JNI_ENOMEM; 1.31 - } 1.32 + if (mr_bs()->is_a(BarrierSet::CardTableModRef)) { 1.33 + _g1_rem_set = new G1RemSet(this, (CardTableModRefBS*)mr_bs()); 1.34 } else { 1.35 - _g1_rem_set = new StupidG1RemSet(this); 1.36 + vm_exit_during_initialization("G1 requires a cardtable mod ref bs."); 1.37 + return JNI_ENOMEM; 1.38 } 1.39 1.40 // Carve out the G1 part of the heap. 1.41 @@ -2706,8 +2702,7 @@ 1.42 } 1.43 1.44 size_t G1CollectedHeap::cards_scanned() { 1.45 - HRInto_G1RemSet* g1_rset = (HRInto_G1RemSet*) g1_rem_set(); 1.46 - return g1_rset->cardsScanned(); 1.47 + return g1_rem_set()->cardsScanned(); 1.48 } 1.49 1.50 void