--- a/src/hotspot/share/gc/g1/g1RemSet.cpp Sat May 18 12:13:38 2019 -0700
+++ b/src/hotspot/share/gc/g1/g1RemSet.cpp Sat May 18 22:11:25 2019 +0200
@@ -188,7 +188,7 @@
void reset() {
for (uint i = 0; i < _max_regions; i++) {
_iter_states[i] = Unclaimed;
- _scan_top[i] = NULL;
+ clear_scan_top(i);
}
G1ResetScanTopClosure cl(_scan_top);
@@ -253,6 +253,10 @@
return _scan_top[region_idx];
}
+ void clear_scan_top(uint region_idx) {
+ _scan_top[region_idx] = NULL;
+ }
+
// Clear the card table of "dirty" regions.
void clear_card_table(WorkGang* workers) {
if (_cur_dirty_region == 0) {
@@ -346,7 +350,7 @@
G1OopStarChunkedList* opt_rem_set_list = _pss->oops_into_optional_region(r);
G1ScanCardClosure scan_cl(_g1h, _pss);
- G1ScanRSForOptionalClosure cl(&scan_cl);
+ G1ScanRSForOptionalClosure cl(_g1h, &scan_cl);
_opt_refs_scanned += opt_rem_set_list->oops_do(&cl, _pss->closures()->raw_strong_oops());
_opt_refs_memory_used += opt_rem_set_list->used_memory();
@@ -550,6 +554,10 @@
_scan_state->reset();
}
+void G1RemSet::prepare_for_scan_rem_set(uint region_idx) {
+ _scan_state->clear_scan_top(region_idx);
+}
+
void G1RemSet::cleanup_after_scan_rem_set() {
G1GCPhaseTimes* phase_times = _g1h->phase_times();