提交 f1dae986 编写于 作者: S stefank

8047323: Remove unused _copy_metadata_obj_cl in G1CopyingKeepAliveClosure

Reviewed-by: mgerdin, tschatzl
上级 afffc5eb
...@@ -5124,17 +5124,14 @@ public: ...@@ -5124,17 +5124,14 @@ public:
class G1CopyingKeepAliveClosure: public OopClosure { class G1CopyingKeepAliveClosure: public OopClosure {
G1CollectedHeap* _g1h; G1CollectedHeap* _g1h;
OopClosure* _copy_non_heap_obj_cl; OopClosure* _copy_non_heap_obj_cl;
OopsInHeapRegionClosure* _copy_metadata_obj_cl;
G1ParScanThreadState* _par_scan_state; G1ParScanThreadState* _par_scan_state;
public: public:
G1CopyingKeepAliveClosure(G1CollectedHeap* g1h, G1CopyingKeepAliveClosure(G1CollectedHeap* g1h,
OopClosure* non_heap_obj_cl, OopClosure* non_heap_obj_cl,
OopsInHeapRegionClosure* metadata_obj_cl,
G1ParScanThreadState* pss): G1ParScanThreadState* pss):
_g1h(g1h), _g1h(g1h),
_copy_non_heap_obj_cl(non_heap_obj_cl), _copy_non_heap_obj_cl(non_heap_obj_cl),
_copy_metadata_obj_cl(metadata_obj_cl),
_par_scan_state(pss) _par_scan_state(pss)
{} {}
...@@ -5167,7 +5164,7 @@ public: ...@@ -5167,7 +5164,7 @@ public:
_par_scan_state->push_on_queue(p); _par_scan_state->push_on_queue(p);
} else { } else {
assert(!Metaspace::contains((const void*)p), assert(!Metaspace::contains((const void*)p),
err_msg("Otherwise need to call _copy_metadata_obj_cl->do_oop(p) " err_msg("Unexpectedly found a pointer from metadata: "
PTR_FORMAT, p)); PTR_FORMAT, p));
_copy_non_heap_obj_cl->do_oop(p); _copy_non_heap_obj_cl->do_oop(p);
} }
...@@ -5262,22 +5259,18 @@ public: ...@@ -5262,22 +5259,18 @@ public:
pss.set_evac_failure_closure(&evac_failure_cl); pss.set_evac_failure_closure(&evac_failure_cl);
G1ParScanExtRootClosure only_copy_non_heap_cl(_g1h, &pss, NULL); G1ParScanExtRootClosure only_copy_non_heap_cl(_g1h, &pss, NULL);
G1ParScanMetadataClosure only_copy_metadata_cl(_g1h, &pss, NULL);
G1ParScanAndMarkExtRootClosure copy_mark_non_heap_cl(_g1h, &pss, NULL); G1ParScanAndMarkExtRootClosure copy_mark_non_heap_cl(_g1h, &pss, NULL);
G1ParScanAndMarkMetadataClosure copy_mark_metadata_cl(_g1h, &pss, NULL);
OopClosure* copy_non_heap_cl = &only_copy_non_heap_cl; OopClosure* copy_non_heap_cl = &only_copy_non_heap_cl;
OopsInHeapRegionClosure* copy_metadata_cl = &only_copy_metadata_cl;
if (_g1h->g1_policy()->during_initial_mark_pause()) { if (_g1h->g1_policy()->during_initial_mark_pause()) {
// We also need to mark copied objects. // We also need to mark copied objects.
copy_non_heap_cl = &copy_mark_non_heap_cl; copy_non_heap_cl = &copy_mark_non_heap_cl;
copy_metadata_cl = &copy_mark_metadata_cl;
} }
// Keep alive closure. // Keep alive closure.
G1CopyingKeepAliveClosure keep_alive(_g1h, copy_non_heap_cl, copy_metadata_cl, &pss); G1CopyingKeepAliveClosure keep_alive(_g1h, copy_non_heap_cl, &pss);
// Complete GC closure // Complete GC closure
G1ParEvacuateFollowersClosure drain_queue(_g1h, &pss, _task_queues, _terminator); G1ParEvacuateFollowersClosure drain_queue(_g1h, &pss, _task_queues, _terminator);
...@@ -5371,18 +5364,14 @@ public: ...@@ -5371,18 +5364,14 @@ public:
assert(pss.queue_is_empty(), "both queue and overflow should be empty"); assert(pss.queue_is_empty(), "both queue and overflow should be empty");
G1ParScanExtRootClosure only_copy_non_heap_cl(_g1h, &pss, NULL); G1ParScanExtRootClosure only_copy_non_heap_cl(_g1h, &pss, NULL);
G1ParScanMetadataClosure only_copy_metadata_cl(_g1h, &pss, NULL);
G1ParScanAndMarkExtRootClosure copy_mark_non_heap_cl(_g1h, &pss, NULL); G1ParScanAndMarkExtRootClosure copy_mark_non_heap_cl(_g1h, &pss, NULL);
G1ParScanAndMarkMetadataClosure copy_mark_metadata_cl(_g1h, &pss, NULL);
OopClosure* copy_non_heap_cl = &only_copy_non_heap_cl; OopClosure* copy_non_heap_cl = &only_copy_non_heap_cl;
OopsInHeapRegionClosure* copy_metadata_cl = &only_copy_metadata_cl;
if (_g1h->g1_policy()->during_initial_mark_pause()) { if (_g1h->g1_policy()->during_initial_mark_pause()) {
// We also need to mark copied objects. // We also need to mark copied objects.
copy_non_heap_cl = &copy_mark_non_heap_cl; copy_non_heap_cl = &copy_mark_non_heap_cl;
copy_metadata_cl = &copy_mark_metadata_cl;
} }
// Is alive closure // Is alive closure
...@@ -5390,7 +5379,7 @@ public: ...@@ -5390,7 +5379,7 @@ public:
// Copying keep alive closure. Applied to referent objects that need // Copying keep alive closure. Applied to referent objects that need
// to be copied. // to be copied.
G1CopyingKeepAliveClosure keep_alive(_g1h, copy_non_heap_cl, copy_metadata_cl, &pss); G1CopyingKeepAliveClosure keep_alive(_g1h, copy_non_heap_cl, &pss);
ReferenceProcessor* rp = _g1h->ref_processor_cm(); ReferenceProcessor* rp = _g1h->ref_processor_cm();
...@@ -5496,22 +5485,18 @@ void G1CollectedHeap::process_discovered_references(uint no_of_gc_workers) { ...@@ -5496,22 +5485,18 @@ void G1CollectedHeap::process_discovered_references(uint no_of_gc_workers) {
assert(pss.queue_is_empty(), "pre-condition"); assert(pss.queue_is_empty(), "pre-condition");
G1ParScanExtRootClosure only_copy_non_heap_cl(this, &pss, NULL); G1ParScanExtRootClosure only_copy_non_heap_cl(this, &pss, NULL);
G1ParScanMetadataClosure only_copy_metadata_cl(this, &pss, NULL);
G1ParScanAndMarkExtRootClosure copy_mark_non_heap_cl(this, &pss, NULL); G1ParScanAndMarkExtRootClosure copy_mark_non_heap_cl(this, &pss, NULL);
G1ParScanAndMarkMetadataClosure copy_mark_metadata_cl(this, &pss, NULL);
OopClosure* copy_non_heap_cl = &only_copy_non_heap_cl; OopClosure* copy_non_heap_cl = &only_copy_non_heap_cl;
OopsInHeapRegionClosure* copy_metadata_cl = &only_copy_metadata_cl;
if (_g1h->g1_policy()->during_initial_mark_pause()) { if (_g1h->g1_policy()->during_initial_mark_pause()) {
// We also need to mark copied objects. // We also need to mark copied objects.
copy_non_heap_cl = &copy_mark_non_heap_cl; copy_non_heap_cl = &copy_mark_non_heap_cl;
copy_metadata_cl = &copy_mark_metadata_cl;
} }
// Keep alive closure. // Keep alive closure.
G1CopyingKeepAliveClosure keep_alive(this, copy_non_heap_cl, copy_metadata_cl, &pss); G1CopyingKeepAliveClosure keep_alive(this, copy_non_heap_cl, &pss);
// Serial Complete GC closure // Serial Complete GC closure
G1STWDrainQueueClosure drain_queue(this, &pss); G1STWDrainQueueClosure drain_queue(this, &pss);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册