8219097: Move comment about using weak code blobs closure for code root scanning to correct place
Reviewed-by: kbarrett
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp Tue Feb 19 12:56:02 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp Tue Feb 19 12:56:02 2019 +0100
@@ -3282,10 +3282,6 @@
_root_processor->evacuate_roots(pss, worker_id);
- // We pass a weak code blobs closure to the remembered set scanning because we want to avoid
- // treating the nmethods visited to act as roots for concurrent marking.
- // We only want to make sure that the oops in the nmethods are adjusted with regard to the
- // objects copied by the current evacuation.
_g1h->g1_rem_set()->oops_into_collection_set_do(pss, worker_id);
double strong_roots_sec = os::elapsedTime() - start_strong_roots_sec;
--- a/src/hotspot/share/gc/g1/g1RemSet.cpp Tue Feb 19 12:56:02 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1RemSet.cpp Tue Feb 19 12:56:02 2019 +0100
@@ -409,6 +409,10 @@
void G1ScanRSForRegionClosure::scan_strong_code_roots(HeapRegion* r) {
EventGCPhaseParallel event;
+ // We pass a weak code blobs closure to the remembered set scanning because we want to avoid
+ // treating the nmethods visited to act as roots for concurrent marking.
+ // We only want to make sure that the oops in the nmethods are adjusted with regard to the
+ // objects copied by the current evacuation.
r->strong_code_roots_do(_pss->closures()->weak_codeblobs());
event.commit(GCId::current(), _worker_i, G1GCPhaseTimes::phase_name(G1GCPhaseTimes::CodeRoots));
}