1.1 --- a/src/share/vm/gc_implementation/g1/g1EvacFailure.hpp Tue Jan 24 17:08:58 2012 -0500 1.2 +++ b/src/share/vm/gc_implementation/g1/g1EvacFailure.hpp Thu Jan 12 00:06:47 2012 -0800 1.3 @@ -70,16 +70,20 @@ 1.4 OopsInHeapRegionClosure *_update_rset_cl; 1.5 bool _during_initial_mark; 1.6 bool _during_conc_mark; 1.7 + uint _worker_id; 1.8 + 1.9 public: 1.10 RemoveSelfForwardPtrObjClosure(G1CollectedHeap* g1, ConcurrentMark* cm, 1.11 HeapRegion* hr, 1.12 OopsInHeapRegionClosure* update_rset_cl, 1.13 bool during_initial_mark, 1.14 - bool during_conc_mark) : 1.15 + bool during_conc_mark, 1.16 + uint worker_id) : 1.17 _g1(g1), _cm(cm), _hr(hr), _marked_bytes(0), 1.18 _update_rset_cl(update_rset_cl), 1.19 _during_initial_mark(during_initial_mark), 1.20 - _during_conc_mark(during_conc_mark) { } 1.21 + _during_conc_mark(during_conc_mark), 1.22 + _worker_id(worker_id) { } 1.23 1.24 size_t marked_bytes() { return _marked_bytes; } 1.25 1.26 @@ -123,7 +127,7 @@ 1.27 // explicitly and all objects in the CSet are considered 1.28 // (implicitly) live. So, we won't mark them explicitly and 1.29 // we'll leave them over NTAMS. 1.30 - _cm->markNext(obj); 1.31 + _cm->grayRoot(obj, obj_size, _worker_id); 1.32 } 1.33 _marked_bytes += (obj_size * HeapWordSize); 1.34 obj->set_mark(markOopDesc::prototype()); 1.35 @@ -155,12 +159,14 @@ 1.36 G1CollectedHeap* _g1h; 1.37 ConcurrentMark* _cm; 1.38 OopsInHeapRegionClosure *_update_rset_cl; 1.39 + uint _worker_id; 1.40 1.41 public: 1.42 RemoveSelfForwardPtrHRClosure(G1CollectedHeap* g1h, 1.43 - OopsInHeapRegionClosure* update_rset_cl) : 1.44 + OopsInHeapRegionClosure* update_rset_cl, 1.45 + uint worker_id) : 1.46 _g1h(g1h), _update_rset_cl(update_rset_cl), 1.47 - _cm(_g1h->concurrent_mark()) { } 1.48 + _worker_id(worker_id), _cm(_g1h->concurrent_mark()) { } 1.49 1.50 bool doHeapRegion(HeapRegion *hr) { 1.51 bool during_initial_mark = _g1h->g1_policy()->during_initial_mark_pause(); 1.52 @@ -173,7 +179,8 @@ 1.53 if (hr->evacuation_failed()) { 1.54 RemoveSelfForwardPtrObjClosure rspc(_g1h, _cm, hr, _update_rset_cl, 1.55 during_initial_mark, 1.56 - during_conc_mark); 1.57 + during_conc_mark, 1.58 + _worker_id); 1.59 1.60 MemRegion mr(hr->bottom(), hr->end()); 1.61 // We'll recreate the prev marking info so we'll first clear 1.62 @@ -226,7 +233,7 @@ 1.63 update_rset_cl = &immediate_update; 1.64 } 1.65 1.66 - RemoveSelfForwardPtrHRClosure rsfp_cl(_g1h, update_rset_cl); 1.67 + RemoveSelfForwardPtrHRClosure rsfp_cl(_g1h, update_rset_cl, worker_id); 1.68 1.69 HeapRegion* hr = _g1h->start_cset_region_for_worker(worker_id); 1.70 _g1h->collection_set_iterate_from(hr, &rsfp_cl);