--- old/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2017-11-03 14:43:17.470493542 +0100 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2017-11-03 14:43:17.083481615 +0100 @@ -1554,7 +1554,7 @@ _bot(NULL), _hot_card_cache(NULL), _g1_rem_set(NULL), - _cg1r(NULL), + _cr(NULL), _g1mm(NULL), _preserved_marks_set(true /* in_c_heap */), _secondary_free_list("Secondary Free List", new SecondaryFreeRegionListMtSafeChecker()), @@ -1633,7 +1633,7 @@ jint G1CollectedHeap::initialize_concurrent_refinement() { jint ecode = JNI_OK; - _cg1r = G1ConcurrentRefine::create(&ecode); + _cr = G1ConcurrentRefine::create(&ecode); return ecode; } @@ -1791,8 +1791,8 @@ JavaThread::dirty_card_queue_set().initialize(DirtyCardQ_CBL_mon, DirtyCardQ_FL_lock, - (int)concurrent_g1_refine()->yellow_zone(), - (int)concurrent_g1_refine()->red_zone(), + (int)concurrent_refine()->yellow_zone(), + (int)concurrent_refine()->red_zone(), Shared_DirtyCardQ_lock, NULL, // fl_owner true); // init_free_ids @@ -1836,7 +1836,7 @@ // Stop all concurrent threads. We do this to make sure these threads // do not continue to execute and access resources (e.g. logging) // that are destroyed during shutdown. - _cg1r->stop(); + _cr->stop(); _cmThread->stop(); if (G1StringDedup::is_enabled()) { G1StringDedup::stop(); @@ -2436,7 +2436,7 @@ _cmThread->print_on(st); st->cr(); _cm->print_worker_threads_on(st); - _cg1r->print_worker_threads_on(st); // also prints the sample thread + _cr->print_worker_threads_on(st); // also prints the sample thread if (G1StringDedup::is_enabled()) { G1StringDedup::print_worker_threads_on(st); } @@ -2446,7 +2446,7 @@ workers()->threads_do(tc); tc->do_thread(_cmThread); _cm->threads_do(tc); - _cg1r->threads_do(tc); // also iterates over the sample thread + _cr->threads_do(tc); // also iterates over the sample thread if (G1StringDedup::is_enabled()) { G1StringDedup::threads_do(tc); } --- old/src/hotspot/share/gc/g1/g1CollectedHeap.hpp 2017-11-03 14:43:19.014541125 +0100 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.hpp 2017-11-03 14:43:18.623529075 +0100 @@ -806,7 +806,7 @@ ConcurrentMarkThread* _cmThread; // The concurrent refiner. - G1ConcurrentRefine* _cg1r; + G1ConcurrentRefine* _cr; // The parallel task queues RefToScanQueueSet *_task_queues; @@ -1389,7 +1389,7 @@ // Refinement - G1ConcurrentRefine* concurrent_g1_refine() const { return _cg1r; } + G1ConcurrentRefine* concurrent_refine() const { return _cr; } // Optimized nmethod scanning support routines --- old/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp 2017-11-03 14:43:20.528587783 +0100 +++ new/src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp 2017-11-03 14:43:20.131575549 +0100 @@ -182,19 +182,19 @@ "min yellow size: " SIZE_FORMAT, green_zone, yellow_zone, red_zone, min_yellow_zone_size); - G1ConcurrentRefine* cg1r = new G1ConcurrentRefine(green_zone, - yellow_zone, - red_zone, - min_yellow_zone_size); + G1ConcurrentRefine* cr = new G1ConcurrentRefine(green_zone, + yellow_zone, + red_zone, + min_yellow_zone_size); - if (cg1r == NULL) { + if (cr == NULL) { *ecode = JNI_ENOMEM; vm_shutdown_during_initialization("Could not create G1ConcurrentRefine"); return NULL; } - cg1r->_threads = NEW_C_HEAP_ARRAY_RETURN_NULL(G1ConcurrentRefineThread*, cg1r->_n_worker_threads, mtGC); - if (cg1r->_threads == NULL) { + cr->_threads = NEW_C_HEAP_ARRAY_RETURN_NULL(G1ConcurrentRefineThread*, cr->_n_worker_threads, mtGC); + if (cr->_threads == NULL) { *ecode = JNI_ENOMEM; vm_shutdown_during_initialization("Could not allocate an array for G1ConcurrentRefineThread"); return NULL; @@ -203,10 +203,10 @@ uint worker_id_offset = DirtyCardQueueSet::num_par_ids(); G1ConcurrentRefineThread *next = NULL; - for (uint i = cg1r->_n_worker_threads - 1; i != UINT_MAX; i--) { + for (uint i = cr->_n_worker_threads - 1; i != UINT_MAX; i--) { Thresholds thresholds = calc_thresholds(green_zone, yellow_zone, i); G1ConcurrentRefineThread* t = - new G1ConcurrentRefineThread(cg1r, + new G1ConcurrentRefineThread(cr, next, worker_id_offset, i, @@ -219,20 +219,20 @@ return NULL; } - assert(t->cg1r() == cg1r, "Conc refine thread should refer to this"); - cg1r->_threads[i] = t; + assert(t->cr() == cr, "Conc refine thread should refer to this"); + cr->_threads[i] = t; next = t; } - cg1r->_sample_thread = new G1YoungRemSetSamplingThread(); - if (cg1r->_sample_thread->osthread() == NULL) { + cr->_sample_thread = new G1YoungRemSetSamplingThread(); + if (cr->_sample_thread->osthread() == NULL) { *ecode = JNI_ENOMEM; vm_shutdown_during_initialization("Could not create G1YoungRemSetSamplingThread"); return NULL; } *ecode = JNI_OK; - return cg1r; + return cr; } void G1ConcurrentRefine::stop() { --- old/src/hotspot/share/gc/g1/g1ConcurrentRefineThread.cpp 2017-11-03 14:43:22.006633332 +0100 +++ new/src/hotspot/share/gc/g1/g1ConcurrentRefineThread.cpp 2017-11-03 14:43:21.618621375 +0100 @@ -33,7 +33,7 @@ #include "runtime/handles.inline.hpp" #include "runtime/mutexLocker.hpp" -G1ConcurrentRefineThread::G1ConcurrentRefineThread(G1ConcurrentRefine* cg1r, +G1ConcurrentRefineThread::G1ConcurrentRefineThread(G1ConcurrentRefine* cr, G1ConcurrentRefineThread *next, uint worker_id_offset, uint worker_id, @@ -45,7 +45,7 @@ _active(false), _next(next), _monitor(NULL), - _cg1r(cg1r), + _cr(cr), _vtime_accum(0.0), _activation_threshold(activate), _deactivation_threshold(deactivate) @@ -134,7 +134,7 @@ size_t curr_buffer_num = dcqs.completed_buffers_num(); // If the number of the buffers falls down into the yellow zone, // that means that the transition period after the evacuation pause has ended. - if (dcqs.completed_queue_padding() > 0 && curr_buffer_num <= cg1r()->yellow_zone()) { + if (dcqs.completed_queue_padding() > 0 && curr_buffer_num <= cr()->yellow_zone()) { dcqs.set_completed_queue_padding(0); } --- old/src/hotspot/share/gc/g1/g1ConcurrentRefineThread.hpp 2017-11-03 14:43:23.473678542 +0100 +++ new/src/hotspot/share/gc/g1/g1ConcurrentRefineThread.hpp 2017-11-03 14:43:23.076666308 +0100 @@ -49,7 +49,7 @@ bool _active; G1ConcurrentRefineThread* _next; Monitor* _monitor; - G1ConcurrentRefine* _cg1r; + G1ConcurrentRefine* _cr; // This thread's activation/deactivation thresholds size_t _activation_threshold; @@ -69,7 +69,7 @@ public: // Constructor - G1ConcurrentRefineThread(G1ConcurrentRefine* cg1r, G1ConcurrentRefineThread* next, + G1ConcurrentRefineThread(G1ConcurrentRefine* cr, G1ConcurrentRefineThread* next, uint worker_id_offset, uint worker_id, size_t activate, size_t deactivate); @@ -79,7 +79,7 @@ // Total virtual time so far. double vtime_accum() { return _vtime_accum; } - G1ConcurrentRefine* cg1r() { return _cg1r; } + G1ConcurrentRefine* cr() { return _cr; } }; #endif // SHARE_VM_GC_G1_G1CONCURRENTREFINETHREAD_HPP --- old/src/hotspot/share/gc/g1/g1DefaultPolicy.cpp 2017-11-03 14:43:24.921723167 +0100 +++ new/src/hotspot/share/gc/g1/g1DefaultPolicy.cpp 2017-11-03 14:43:24.533711210 +0100 @@ -745,7 +745,7 @@ } else { update_rs_time_goal_ms -= scan_hcc_time_ms; } - _g1->concurrent_g1_refine()->adjust(average_time_ms(G1GCPhaseTimes::UpdateRS) - scan_hcc_time_ms, + _g1->concurrent_refine()->adjust(average_time_ms(G1GCPhaseTimes::UpdateRS) - scan_hcc_time_ms, phase_times()->sum_thread_work_items(G1GCPhaseTimes::UpdateRS), update_rs_time_goal_ms); --- old/src/hotspot/share/gc/g1/g1RemSetSummary.cpp 2017-11-03 14:43:26.381768161 +0100 +++ new/src/hotspot/share/gc/g1/g1RemSetSummary.cpp 2017-11-03 14:43:25.991756142 +0100 @@ -59,12 +59,12 @@ _num_coarsenings = HeapRegionRemSet::n_coarsenings(); - G1ConcurrentRefine * cg1r = G1CollectedHeap::heap()->concurrent_g1_refine(); + G1ConcurrentRefine * cr = G1CollectedHeap::heap()->concurrent_refine(); if (_rs_threads_vtimes != NULL) { GetRSThreadVTimeClosure p(this); - cg1r->worker_threads_do(&p); + cr->worker_threads_do(&p); } - set_sampling_thread_vtime(cg1r->sampling_thread()->vtime_accum()); + set_sampling_thread_vtime(cr->sampling_thread()->vtime_accum()); } void G1RemSetSummary::set_rs_thread_vtime(uint thread, double value) {