src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp

Print this page




 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 }




 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         _cm->clearNextBitmap();
 284       } else {
 285         assert(!G1VerifyBitmaps || _cm->nextMarkBitmapIsClear(), "Next mark bitmap must be clear");
 286       }
 287     }
 288 
 289     // Update the number of full collections that have been
 290     // completed. This will also notify the FullGCCount_lock in case a
 291     // Java thread is waiting for a full GC to happen (e.g., it
 292     // called System.gc() with +ExplicitGCInvokesConcurrent).
 293     {
 294       SuspendibleThreadSetJoiner sts;
 295       g1h->increment_old_marking_cycles_completed(true /* concurrent */);
 296       g1h->register_concurrent_cycle_end();
 297     }
 298   }
 299   assert(_should_terminate, "just checking");
 300 
 301   terminate();
 302 }