src/share/vm/gc/g1/concurrentG1RefineThread.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/gc/g1/concurrentG1RefineThread.cpp	Thu Feb 25 12:30:24 2016
--- new/src/share/vm/gc/g1/concurrentG1RefineThread.cpp	Thu Feb 25 12:30:23 2016

*** 65,78 **** --- 65,80 ---- create_and_start(); } void ConcurrentG1RefineThread::initialize() { // Current thread activation threshold - _threshold = MIN2<int>(cg1r()->thread_threshold_step() * (_worker_id + 1) + cg1r()->green_zone(), cg1r()->yellow_zone()); // A thread deactivates once the number of buffer reached a deactivation threshold _deactivation_threshold = MAX2<int>(_threshold - cg1r()->thread_threshold_step(), cg1r()->green_zone()); + _deactivation_threshold = + MAX2(_threshold - MIN2(_threshold, cg1r()->thread_threshold_step()), + cg1r()->green_zone()); } void ConcurrentG1RefineThread::wait_for_completed_buffers() { DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); MutexLockerEx x(_monitor, Mutex::_no_safepoint_check_flag);
*** 125,142 **** --- 127,144 ---- if (_should_terminate) { break; } DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); ! log_debug(gc, refine)("Activated %d, on threshold: %d, current: %d", ! log_debug(gc, refine)("Activated %d, on threshold: " SIZE_FORMAT ", current: " SIZE_FORMAT, _worker_id, _threshold, dcqs.completed_buffers_num()); { SuspendibleThreadSetJoiner sts_join; do { ! int curr_buffer_num = (int)dcqs.completed_buffers_num(); ! 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()) { dcqs.set_completed_queue_padding(0); }
*** 149,159 **** --- 151,161 ---- _worker_id + _worker_id_offset, _deactivation_threshold, false /* during_pause */)); deactivate(); ! log_debug(gc, refine)("Deactivated %d, off threshold: %d, current: %d", ! log_debug(gc, refine)("Deactivated %d, off threshold: " SIZE_FORMAT ", current: " SIZE_FORMAT, _worker_id, _deactivation_threshold, dcqs.completed_buffers_num()); } if (os::supports_vtime()) {

src/share/vm/gc/g1/concurrentG1RefineThread.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File