--- old/src/hotspot/share/gc/g1/g1RemSet.cpp 2018-03-29 19:39:58.092681514 +0200 +++ new/src/hotspot/share/gc/g1/g1RemSet.cpp 2018-03-29 19:39:57.822673236 +0200 @@ -276,14 +276,14 @@ } }; -G1RemSet::G1RemSet(G1CollectedHeap* g1, +G1RemSet::G1RemSet(G1CollectedHeap* g1h, G1CardTable* ct, G1HotCardCache* hot_card_cache) : - _g1(g1), + _g1h(g1h), _scan_state(new G1RemSetScanState()), _num_conc_refined_cards(0), _ct(ct), - _g1p(_g1->g1_policy()), + _g1p(_g1h->g1_policy()), _hot_card_cache(hot_card_cache), _prev_period_summary() { } @@ -408,9 +408,9 @@ uint worker_i) { double rs_time_start = os::elapsedTime(); - G1ScanObjsDuringScanRSClosure scan_cl(_g1, pss); + G1ScanObjsDuringScanRSClosure scan_cl(_g1h, pss); G1ScanRSForRegionClosure cl(_scan_state, &scan_cl, heap_region_codeblobs, worker_i); - _g1->collection_set_iterate_from(&cl, worker_i); + _g1h->collection_set_iterate_from(&cl, worker_i); double scan_rs_time_sec = (os::elapsedTime() - rs_time_start) - cl.strong_code_root_scan_time_sec(); @@ -459,17 +459,17 @@ }; void G1RemSet::update_rem_set(G1ParScanThreadState* pss, uint worker_i) { - G1ScanObjsDuringUpdateRSClosure update_rs_cl(_g1, pss, worker_i); - G1RefineCardClosure refine_card_cl(_g1, &update_rs_cl); + G1ScanObjsDuringUpdateRSClosure update_rs_cl(_g1h, pss, worker_i); + G1RefineCardClosure refine_card_cl(_g1h, &update_rs_cl); G1GCParPhaseTimesTracker x(_g1p->phase_times(), G1GCPhaseTimes::UpdateRS, worker_i); if (G1HotCardCache::default_use_cache()) { // Apply the closure to the entries of the hot card cache. G1GCParPhaseTimesTracker y(_g1p->phase_times(), G1GCPhaseTimes::ScanHCC, worker_i); - _g1->iterate_hcc_closure(&refine_card_cl, worker_i); + _g1h->iterate_hcc_closure(&refine_card_cl, worker_i); } // Apply the closure to all remaining log entries. - _g1->iterate_dirty_card_closure(&refine_card_cl, worker_i); + _g1h->iterate_dirty_card_closure(&refine_card_cl, worker_i); G1GCPhaseTimes* p = _g1p->phase_times(); p->record_thread_work_item(G1GCPhaseTimes::UpdateRS, worker_i, refine_card_cl.cards_scanned(), G1GCPhaseTimes::UpdateRSScannedCards); @@ -495,11 +495,11 @@ } void G1RemSet::cleanup_after_oops_into_collection_set_do() { - G1GCPhaseTimes* phase_times = _g1->g1_policy()->phase_times(); + G1GCPhaseTimes* phase_times = _g1h->g1_policy()->phase_times(); // Set all cards back to clean. double start = os::elapsedTime(); - _scan_state->clear_card_table(_g1->workers()); + _scan_state->clear_card_table(_g1h->workers()); phase_times->record_clear_ct_time((os::elapsedTime() - start) * 1000.0); } @@ -517,7 +517,7 @@ void G1RemSet::refine_card_concurrently(jbyte* card_ptr, uint worker_i) { - assert(!_g1->is_gc_active(), "Only call concurrently"); + assert(!_g1h->is_gc_active(), "Only call concurrently"); check_card_ptr(card_ptr, _ct); @@ -529,7 +529,7 @@ // Construct the region representing the card. HeapWord* start = _ct->addr_for(card_ptr); // And find the region containing it. - HeapRegion* r = _g1->heap_region_containing(start); + HeapRegion* r = _g1h->heap_region_containing(start); // This check is needed for some uncommon cases where we should // ignore the card. @@ -574,7 +574,7 @@ } else if (card_ptr != orig_card_ptr) { // Original card was inserted and an old card was evicted. start = _ct->addr_for(card_ptr); - r = _g1->heap_region_containing(start); + r = _g1h->heap_region_containing(start); // Check whether the region formerly in the cache should be // ignored, as discussed earlier for the original card. The @@ -623,7 +623,7 @@ MemRegion dirty_region(start, MIN2(scan_limit, end)); assert(!dirty_region.is_empty(), "sanity"); - G1ConcurrentRefineOopClosure conc_refine_cl(_g1, worker_i); + G1ConcurrentRefineOopClosure conc_refine_cl(_g1h, worker_i); bool card_processed = r->oops_on_card_seq_iterate_careful(dirty_region, &conc_refine_cl); @@ -651,7 +651,7 @@ bool G1RemSet::refine_card_during_gc(jbyte* card_ptr, G1ScanObjsDuringUpdateRSClosure* update_rs_cl) { - assert(_g1->is_gc_active(), "Only call during GC"); + assert(_g1h->is_gc_active(), "Only call during GC"); check_card_ptr(card_ptr, _ct); @@ -668,7 +668,7 @@ // Construct the region representing the card. HeapWord* card_start = _ct->addr_for(card_ptr); // And find the region containing it. - uint const card_region_idx = _g1->addr_to_region(card_start); + uint const card_region_idx = _g1h->addr_to_region(card_start); _scan_state->add_dirty_region(card_region_idx); HeapWord* scan_limit = _scan_state->scan_top(card_region_idx); @@ -683,7 +683,7 @@ MemRegion dirty_region(card_start, MIN2(scan_limit, card_end)); assert(!dirty_region.is_empty(), "sanity"); - HeapRegion* const card_region = _g1->region_at(card_region_idx); + HeapRegion* const card_region = _g1h->region_at(card_region_idx); update_rs_cl->set_region(card_region); bool card_processed = card_region->oops_on_card_seq_iterate_careful(dirty_region, update_rs_cl); assert(card_processed, "must be");