comparison src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp @ 1282:b81f3572f355

6928059: G1: command line parameter renaming Summary: Rename G1 parameters to make them more consistent. Reviewed-by: jmasa, johnc
author tonyp
date Tue, 23 Feb 2010 23:13:23 -0500
parents 44f61c24ddab
children 1316cec51b4d
comparison
equal deleted inserted replaced
1262:58add740c4ee 1282:b81f3572f355
105 105
106 MutexLockerEx x(_monitor, Mutex::_no_safepoint_check_flag); 106 MutexLockerEx x(_monitor, Mutex::_no_safepoint_check_flag);
107 if (_should_terminate) { 107 if (_should_terminate) {
108 break; 108 break;
109 } 109 }
110 _monitor->wait(Mutex::_no_safepoint_check_flag, G1ConcRefineServiceInterval); 110 _monitor->wait(Mutex::_no_safepoint_check_flag, G1ConcRefinementServiceIntervalMillis);
111 } 111 }
112 } 112 }
113 113
114 void ConcurrentG1RefineThread::wait_for_completed_buffers() { 114 void ConcurrentG1RefineThread::wait_for_completed_buffers() {
115 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); 115 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
125 } 125 }
126 126
127 void ConcurrentG1RefineThread::activate() { 127 void ConcurrentG1RefineThread::activate() {
128 MutexLockerEx x(_monitor, Mutex::_no_safepoint_check_flag); 128 MutexLockerEx x(_monitor, Mutex::_no_safepoint_check_flag);
129 if (_worker_id > 0) { 129 if (_worker_id > 0) {
130 if (G1TraceConcurrentRefinement) { 130 if (G1TraceConcRefinement) {
131 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); 131 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
132 gclog_or_tty->print_cr("G1-Refine-activated worker %d, on threshold %d, current %d", 132 gclog_or_tty->print_cr("G1-Refine-activated worker %d, on threshold %d, current %d",
133 _worker_id, _threshold, (int)dcqs.completed_buffers_num()); 133 _worker_id, _threshold, (int)dcqs.completed_buffers_num());
134 } 134 }
135 set_active(true); 135 set_active(true);
141 } 141 }
142 142
143 void ConcurrentG1RefineThread::deactivate() { 143 void ConcurrentG1RefineThread::deactivate() {
144 MutexLockerEx x(_monitor, Mutex::_no_safepoint_check_flag); 144 MutexLockerEx x(_monitor, Mutex::_no_safepoint_check_flag);
145 if (_worker_id > 0) { 145 if (_worker_id > 0) {
146 if (G1TraceConcurrentRefinement) { 146 if (G1TraceConcRefinement) {
147 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); 147 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
148 gclog_or_tty->print_cr("G1-Refine-deactivated worker %d, off threshold %d, current %d", 148 gclog_or_tty->print_cr("G1-Refine-deactivated worker %d, off threshold %d, current %d",
149 _worker_id, _deactivation_threshold, (int)dcqs.completed_buffers_num()); 149 _worker_id, _deactivation_threshold, (int)dcqs.completed_buffers_num());
150 } 150 }
151 set_active(false); 151 set_active(false);
216 terminate(); 216 terminate();
217 } 217 }
218 218
219 219
220 void ConcurrentG1RefineThread::yield() { 220 void ConcurrentG1RefineThread::yield() {
221 if (G1TraceConcurrentRefinement) gclog_or_tty->print_cr("G1-Refine-yield"); 221 if (G1TraceConcRefinement) {
222 gclog_or_tty->print_cr("G1-Refine-yield");
223 }
222 _sts.yield("G1 refine"); 224 _sts.yield("G1 refine");
223 if (G1TraceConcurrentRefinement) gclog_or_tty->print_cr("G1-Refine-yield-end"); 225 if (G1TraceConcRefinement) {
226 gclog_or_tty->print_cr("G1-Refine-yield-end");
227 }
224 } 228 }
225 229
226 void ConcurrentG1RefineThread::stop() { 230 void ConcurrentG1RefineThread::stop() {
227 // it is ok to take late safepoints here, if needed 231 // it is ok to take late safepoints here, if needed
228 { 232 {
239 MutexLockerEx mu(Terminator_lock); 243 MutexLockerEx mu(Terminator_lock);
240 while (!_has_terminated) { 244 while (!_has_terminated) {
241 Terminator_lock->wait(); 245 Terminator_lock->wait();
242 } 246 }
243 } 247 }
244 if (G1TraceConcurrentRefinement) gclog_or_tty->print_cr("G1-Refine-stop"); 248 if (G1TraceConcRefinement) {
249 gclog_or_tty->print_cr("G1-Refine-stop");
250 }
245 } 251 }
246 252
247 void ConcurrentG1RefineThread::print() const { 253 void ConcurrentG1RefineThread::print() const {
248 print_on(tty); 254 print_on(tty);
249 } 255 }