260 // true to prevent us from calling
261 // record_concurrent_mark_cleanup_completed() (and, in fact, it's
262 // not needed any more as the concurrent mark state has been
263 // already reset).
264 {
265 SuspendibleThreadSetJoiner sts;
266 if (!cm()->has_aborted()) {
267 g1_policy->record_concurrent_mark_cleanup_completed();
268 }
269 }
270
271 if (cm()->has_aborted()) {
272 if (G1Log::fine()) {
273 gclog_or_tty->gclog_stamp(cm()->concurrent_gc_id());
274 gclog_or_tty->print_cr("[GC concurrent-mark-abort]");
275 }
276 }
277
278 // We now want to allow clearing of the marking bitmap to be
279 // suspended by a collection pause.
280 {
281 SuspendibleThreadSetJoiner sts;
282 _cm->clearNextBitmap();
283 }
284 }
285
286 // Update the number of full collections that have been
287 // completed. This will also notify the FullGCCount_lock in case a
288 // Java thread is waiting for a full GC to happen (e.g., it
289 // called System.gc() with +ExplicitGCInvokesConcurrent).
290 {
291 SuspendibleThreadSetJoiner sts;
292 g1h->increment_old_marking_cycles_completed(true /* concurrent */);
293 g1h->register_concurrent_cycle_end();
294 }
295 }
296 assert(_should_terminate, "just checking");
297
298 terminate();
299 }
300
301 void ConcurrentMarkThread::stop() {
302 {
|
260 // true to prevent us from calling
261 // record_concurrent_mark_cleanup_completed() (and, in fact, it's
262 // not needed any more as the concurrent mark state has been
263 // already reset).
264 {
265 SuspendibleThreadSetJoiner sts;
266 if (!cm()->has_aborted()) {
267 g1_policy->record_concurrent_mark_cleanup_completed();
268 }
269 }
270
271 if (cm()->has_aborted()) {
272 if (G1Log::fine()) {
273 gclog_or_tty->gclog_stamp(cm()->concurrent_gc_id());
274 gclog_or_tty->print_cr("[GC concurrent-mark-abort]");
275 }
276 }
277
278 // We now want to allow clearing of the marking bitmap to be
279 // suspended by a collection pause.
280 // We may have aborted just before the remark. Do not bother clearing the
281 // bitmap then, as it has been done during mark abort.
282 if (!cm()->has_aborted()) {
283 SuspendibleThreadSetJoiner sts;
284 _cm->clearNextBitmap();
285 } else {
286 assert(!G1VerifyBitmaps || _cm->nextMarkBitmapIsClear(), "Next mark bitmap must be clear");
287 }
288 }
289
290 // Update the number of full collections that have been
291 // completed. This will also notify the FullGCCount_lock in case a
292 // Java thread is waiting for a full GC to happen (e.g., it
293 // called System.gc() with +ExplicitGCInvokesConcurrent).
294 {
295 SuspendibleThreadSetJoiner sts;
296 g1h->increment_old_marking_cycles_completed(true /* concurrent */);
297 g1h->register_concurrent_cycle_end();
298 }
299 }
300 assert(_should_terminate, "just checking");
301
302 terminate();
303 }
304
305 void ConcurrentMarkThread::stop() {
306 {
|