Wed, 25 Jun 2014 08:28:01 +0200
8047323: Remove unused _copy_metadata_obj_cl in G1CopyingKeepAliveClosure
Reviewed-by: mgerdin, tschatzl
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Tue Jun 24 17:09:48 2014 +0200 1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Wed Jun 25 08:28:01 2014 +0200 1.3 @@ -5124,17 +5124,14 @@ 1.4 class G1CopyingKeepAliveClosure: public OopClosure { 1.5 G1CollectedHeap* _g1h; 1.6 OopClosure* _copy_non_heap_obj_cl; 1.7 - OopsInHeapRegionClosure* _copy_metadata_obj_cl; 1.8 G1ParScanThreadState* _par_scan_state; 1.9 1.10 public: 1.11 G1CopyingKeepAliveClosure(G1CollectedHeap* g1h, 1.12 OopClosure* non_heap_obj_cl, 1.13 - OopsInHeapRegionClosure* metadata_obj_cl, 1.14 G1ParScanThreadState* pss): 1.15 _g1h(g1h), 1.16 _copy_non_heap_obj_cl(non_heap_obj_cl), 1.17 - _copy_metadata_obj_cl(metadata_obj_cl), 1.18 _par_scan_state(pss) 1.19 {} 1.20 1.21 @@ -5167,7 +5164,7 @@ 1.22 _par_scan_state->push_on_queue(p); 1.23 } else { 1.24 assert(!Metaspace::contains((const void*)p), 1.25 - err_msg("Otherwise need to call _copy_metadata_obj_cl->do_oop(p) " 1.26 + err_msg("Unexpectedly found a pointer from metadata: " 1.27 PTR_FORMAT, p)); 1.28 _copy_non_heap_obj_cl->do_oop(p); 1.29 } 1.30 @@ -5262,22 +5259,18 @@ 1.31 pss.set_evac_failure_closure(&evac_failure_cl); 1.32 1.33 G1ParScanExtRootClosure only_copy_non_heap_cl(_g1h, &pss, NULL); 1.34 - G1ParScanMetadataClosure only_copy_metadata_cl(_g1h, &pss, NULL); 1.35 1.36 G1ParScanAndMarkExtRootClosure copy_mark_non_heap_cl(_g1h, &pss, NULL); 1.37 - G1ParScanAndMarkMetadataClosure copy_mark_metadata_cl(_g1h, &pss, NULL); 1.38 1.39 OopClosure* copy_non_heap_cl = &only_copy_non_heap_cl; 1.40 - OopsInHeapRegionClosure* copy_metadata_cl = &only_copy_metadata_cl; 1.41 1.42 if (_g1h->g1_policy()->during_initial_mark_pause()) { 1.43 // We also need to mark copied objects. 1.44 copy_non_heap_cl = ©_mark_non_heap_cl; 1.45 - copy_metadata_cl = ©_mark_metadata_cl; 1.46 } 1.47 1.48 // Keep alive closure. 1.49 - G1CopyingKeepAliveClosure keep_alive(_g1h, copy_non_heap_cl, copy_metadata_cl, &pss); 1.50 + G1CopyingKeepAliveClosure keep_alive(_g1h, copy_non_heap_cl, &pss); 1.51 1.52 // Complete GC closure 1.53 G1ParEvacuateFollowersClosure drain_queue(_g1h, &pss, _task_queues, _terminator); 1.54 @@ -5371,18 +5364,14 @@ 1.55 assert(pss.queue_is_empty(), "both queue and overflow should be empty"); 1.56 1.57 G1ParScanExtRootClosure only_copy_non_heap_cl(_g1h, &pss, NULL); 1.58 - G1ParScanMetadataClosure only_copy_metadata_cl(_g1h, &pss, NULL); 1.59 1.60 G1ParScanAndMarkExtRootClosure copy_mark_non_heap_cl(_g1h, &pss, NULL); 1.61 - G1ParScanAndMarkMetadataClosure copy_mark_metadata_cl(_g1h, &pss, NULL); 1.62 1.63 OopClosure* copy_non_heap_cl = &only_copy_non_heap_cl; 1.64 - OopsInHeapRegionClosure* copy_metadata_cl = &only_copy_metadata_cl; 1.65 1.66 if (_g1h->g1_policy()->during_initial_mark_pause()) { 1.67 // We also need to mark copied objects. 1.68 copy_non_heap_cl = ©_mark_non_heap_cl; 1.69 - copy_metadata_cl = ©_mark_metadata_cl; 1.70 } 1.71 1.72 // Is alive closure 1.73 @@ -5390,7 +5379,7 @@ 1.74 1.75 // Copying keep alive closure. Applied to referent objects that need 1.76 // to be copied. 1.77 - G1CopyingKeepAliveClosure keep_alive(_g1h, copy_non_heap_cl, copy_metadata_cl, &pss); 1.78 + G1CopyingKeepAliveClosure keep_alive(_g1h, copy_non_heap_cl, &pss); 1.79 1.80 ReferenceProcessor* rp = _g1h->ref_processor_cm(); 1.81 1.82 @@ -5496,22 +5485,18 @@ 1.83 assert(pss.queue_is_empty(), "pre-condition"); 1.84 1.85 G1ParScanExtRootClosure only_copy_non_heap_cl(this, &pss, NULL); 1.86 - G1ParScanMetadataClosure only_copy_metadata_cl(this, &pss, NULL); 1.87 1.88 G1ParScanAndMarkExtRootClosure copy_mark_non_heap_cl(this, &pss, NULL); 1.89 - G1ParScanAndMarkMetadataClosure copy_mark_metadata_cl(this, &pss, NULL); 1.90 1.91 OopClosure* copy_non_heap_cl = &only_copy_non_heap_cl; 1.92 - OopsInHeapRegionClosure* copy_metadata_cl = &only_copy_metadata_cl; 1.93 1.94 if (_g1h->g1_policy()->during_initial_mark_pause()) { 1.95 // We also need to mark copied objects. 1.96 copy_non_heap_cl = ©_mark_non_heap_cl; 1.97 - copy_metadata_cl = ©_mark_metadata_cl; 1.98 } 1.99 1.100 // Keep alive closure. 1.101 - G1CopyingKeepAliveClosure keep_alive(this, copy_non_heap_cl, copy_metadata_cl, &pss); 1.102 + G1CopyingKeepAliveClosure keep_alive(this, copy_non_heap_cl, &pss); 1.103 1.104 // Serial Complete GC closure 1.105 G1STWDrainQueueClosure drain_queue(this, &pss);