1.1 --- a/src/share/vm/gc_implementation/g1/g1EvacFailure.hpp Wed Sep 10 11:55:33 2014 +0200 1.2 +++ b/src/share/vm/gc_implementation/g1/g1EvacFailure.hpp Tue Sep 30 09:44:36 2014 +0200 1.3 @@ -176,15 +176,17 @@ 1.4 class RemoveSelfForwardPtrHRClosure: public HeapRegionClosure { 1.5 G1CollectedHeap* _g1h; 1.6 ConcurrentMark* _cm; 1.7 - OopsInHeapRegionClosure *_update_rset_cl; 1.8 uint _worker_id; 1.9 1.10 + DirtyCardQueue _dcq; 1.11 + UpdateRSetDeferred _update_rset_cl; 1.12 + 1.13 public: 1.14 RemoveSelfForwardPtrHRClosure(G1CollectedHeap* g1h, 1.15 - OopsInHeapRegionClosure* update_rset_cl, 1.16 uint worker_id) : 1.17 - _g1h(g1h), _update_rset_cl(update_rset_cl), 1.18 - _worker_id(worker_id), _cm(_g1h->concurrent_mark()) { } 1.19 + _g1h(g1h), _dcq(&g1h->dirty_card_queue_set()), _update_rset_cl(g1h, &_dcq), 1.20 + _worker_id(worker_id), _cm(_g1h->concurrent_mark()) { 1.21 + } 1.22 1.23 bool doHeapRegion(HeapRegion *hr) { 1.24 bool during_initial_mark = _g1h->g1_policy()->during_initial_mark_pause(); 1.25 @@ -195,7 +197,7 @@ 1.26 1.27 if (hr->claimHeapRegion(HeapRegion::ParEvacFailureClaimValue)) { 1.28 if (hr->evacuation_failed()) { 1.29 - RemoveSelfForwardPtrObjClosure rspc(_g1h, _cm, hr, _update_rset_cl, 1.30 + RemoveSelfForwardPtrObjClosure rspc(_g1h, _cm, hr, &_update_rset_cl, 1.31 during_initial_mark, 1.32 during_conc_mark, 1.33 _worker_id); 1.34 @@ -214,7 +216,7 @@ 1.35 // whenever this might be required in the future. 1.36 hr->rem_set()->reset_for_par_iteration(); 1.37 hr->reset_bot(); 1.38 - _update_rset_cl->set_region(hr); 1.39 + _update_rset_cl.set_region(hr); 1.40 hr->object_iterate(&rspc); 1.41 1.42 hr->rem_set()->clean_strong_code_roots(hr); 1.43 @@ -238,16 +240,7 @@ 1.44 _g1h(g1h) { } 1.45 1.46 void work(uint worker_id) { 1.47 - UpdateRSetImmediate immediate_update(_g1h->g1_rem_set()); 1.48 - DirtyCardQueue dcq(&_g1h->dirty_card_queue_set()); 1.49 - UpdateRSetDeferred deferred_update(_g1h, &dcq); 1.50 - 1.51 - OopsInHeapRegionClosure *update_rset_cl = &deferred_update; 1.52 - if (!G1DeferredRSUpdate) { 1.53 - update_rset_cl = &immediate_update; 1.54 - } 1.55 - 1.56 - RemoveSelfForwardPtrHRClosure rsfp_cl(_g1h, update_rset_cl, worker_id); 1.57 + RemoveSelfForwardPtrHRClosure rsfp_cl(_g1h, worker_id); 1.58 1.59 HeapRegion* hr = _g1h->start_cset_region_for_worker(worker_id); 1.60 _g1h->collection_set_iterate_from(hr, &rsfp_cl);