Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp @ 936:e1fdf4fd34dc
6871111: G1: remove the concurrent overhead tracker
Summary: Removing the concurrent overhead tracker from G1, along with the GC overhead reporter and the G1AccountConcurrentOverhead (both of which rely on the the concurrent overhead tracker).
Reviewed-by: iveresov, johnc
author | tonyp |
---|---|
date | Wed, 19 Aug 2009 12:53:25 -0400 |
parents | 7f807f55161a |
children | 035d2e036a9b |
comparison
equal
deleted
inserted
replaced
912:308762b2bf14 | 936:e1fdf4fd34dc |
---|---|
37 _worker_id(worker_id), | 37 _worker_id(worker_id), |
38 _active(false), | 38 _active(false), |
39 _next(next), | 39 _next(next), |
40 _cg1r(cg1r), | 40 _cg1r(cg1r), |
41 _vtime_accum(0.0), | 41 _vtime_accum(0.0), |
42 _co_tracker(G1CRGroup), | |
43 _interval_ms(5.0) | 42 _interval_ms(5.0) |
44 { | 43 { |
45 create_and_start(); | 44 create_and_start(); |
46 } | 45 } |
47 | 46 |
73 | 72 |
74 void ConcurrentG1RefineThread::run() { | 73 void ConcurrentG1RefineThread::run() { |
75 initialize_in_thread(); | 74 initialize_in_thread(); |
76 _vtime_start = os::elapsedVTime(); | 75 _vtime_start = os::elapsedVTime(); |
77 wait_for_universe_init(); | 76 wait_for_universe_init(); |
78 | |
79 _co_tracker.enable(); | |
80 _co_tracker.start(); | |
81 | 77 |
82 while (!_should_terminate) { | 78 while (!_should_terminate) { |
83 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); | 79 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); |
84 // Wait for completed log buffers to exist. | 80 // Wait for completed log buffers to exist. |
85 { | 81 { |
145 if (G1TraceConcurrentRefinement) { | 141 if (G1TraceConcurrentRefinement) { |
146 gclog_or_tty->print_cr("G1-Refine-deactivated worker %d", _worker_id); | 142 gclog_or_tty->print_cr("G1-Refine-deactivated worker %d", _worker_id); |
147 } | 143 } |
148 break; | 144 break; |
149 } | 145 } |
150 _co_tracker.update(false); | |
151 | 146 |
152 // Check if we need to activate the next thread. | 147 // Check if we need to activate the next thread. |
153 if (curr_buffer_num > next_threshold && _next != NULL && !_next->is_active()) { | 148 if (curr_buffer_num > next_threshold && _next != NULL && !_next->is_active()) { |
154 MutexLockerEx x(DirtyCardQ_CBL_mon, Mutex::_no_safepoint_check_flag); | 149 MutexLockerEx x(DirtyCardQ_CBL_mon, Mutex::_no_safepoint_check_flag); |
155 _next->activate(); | 150 _next->activate(); |
166 _sts.join(); | 161 _sts.join(); |
167 start_vtime_sec = os::elapsedVTime(); | 162 start_vtime_sec = os::elapsedVTime(); |
168 } | 163 } |
169 n_logs++; | 164 n_logs++; |
170 } | 165 } |
171 _co_tracker.update(false); | |
172 _sts.leave(); | 166 _sts.leave(); |
173 | 167 |
174 if (os::supports_vtime()) { | 168 if (os::supports_vtime()) { |
175 _vtime_accum = (os::elapsedVTime() - _vtime_start); | 169 _vtime_accum = (os::elapsedVTime() - _vtime_start); |
176 } else { | 170 } else { |
177 _vtime_accum = 0.0; | 171 _vtime_accum = 0.0; |
178 } | 172 } |
179 } | 173 } |
180 _sts.join(); | |
181 _co_tracker.update(true); | |
182 _sts.leave(); | |
183 assert(_should_terminate, "just checking"); | 174 assert(_should_terminate, "just checking"); |
184 | 175 |
185 terminate(); | 176 terminate(); |
186 } | 177 } |
187 | 178 |