251 VM_G1Concurrent op(&cl_cl, "Pause Cleanup");
252 VMThread::execute(&op);
253 }
254
255 // We now want to allow clearing of the marking bitmap to be
256 // suspended by a collection pause.
257 // We may have aborted just before the remark. Do not bother clearing the
258 // bitmap then, as it has been done during mark abort.
259 if (!_cm->has_aborted()) {
260 G1ConcPhaseTimer p(_cm, "Concurrent Cleanup for Next Mark");
261 _cm->cleanup_for_next_mark();
262 }
263 }
264
265 // Update the number of full collections that have been
266 // completed. This will also notify the G1OldGCCount_lock in case a
267 // Java thread is waiting for a full GC to happen (e.g., it
268 // called System.gc() with +ExplicitGCInvokesConcurrent).
269 {
270 SuspendibleThreadSetJoiner sts_join;
271 g1h->increment_old_marking_cycles_completed(true /* concurrent */);
272
273 _cm->concurrent_cycle_end();
274 ConcurrentGCBreakpoints::notify_active_to_idle();
275 }
276 }
277 _cm->root_regions()->cancel_scan();
278 }
279
280 void G1ConcurrentMarkThread::stop_service() {
281 MutexLocker ml(CGC_lock, Mutex::_no_safepoint_check_flag);
282 CGC_lock->notify_all();
283 }
284
285
286 void G1ConcurrentMarkThread::sleep_before_next_cycle() {
287 // We join here because we don't want to do the "shouldConcurrentMark()"
288 // below while the world is otherwise stopped.
289 assert(!in_progress(), "should have been cleared");
290
291 MonitorLocker ml(CGC_lock, Mutex::_no_safepoint_check_flag);
|
251 VM_G1Concurrent op(&cl_cl, "Pause Cleanup");
252 VMThread::execute(&op);
253 }
254
255 // We now want to allow clearing of the marking bitmap to be
256 // suspended by a collection pause.
257 // We may have aborted just before the remark. Do not bother clearing the
258 // bitmap then, as it has been done during mark abort.
259 if (!_cm->has_aborted()) {
260 G1ConcPhaseTimer p(_cm, "Concurrent Cleanup for Next Mark");
261 _cm->cleanup_for_next_mark();
262 }
263 }
264
265 // Update the number of full collections that have been
266 // completed. This will also notify the G1OldGCCount_lock in case a
267 // Java thread is waiting for a full GC to happen (e.g., it
268 // called System.gc() with +ExplicitGCInvokesConcurrent).
269 {
270 SuspendibleThreadSetJoiner sts_join;
271 g1h->increment_old_marking_cycles_completed(true /* concurrent */,
272 !_cm->has_aborted() /* liveness_completed */);
273
274 _cm->concurrent_cycle_end();
275 ConcurrentGCBreakpoints::notify_active_to_idle();
276 }
277 }
278 _cm->root_regions()->cancel_scan();
279 }
280
281 void G1ConcurrentMarkThread::stop_service() {
282 MutexLocker ml(CGC_lock, Mutex::_no_safepoint_check_flag);
283 CGC_lock->notify_all();
284 }
285
286
287 void G1ConcurrentMarkThread::sleep_before_next_cycle() {
288 // We join here because we don't want to do the "shouldConcurrentMark()"
289 // below while the world is otherwise stopped.
290 assert(!in_progress(), "should have been cleared");
291
292 MonitorLocker ml(CGC_lock, Mutex::_no_safepoint_check_flag);
|