src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp
Print this page
rev 6670 : 8048085: Aborting marking just before remark results in useless additional clearing of the next mark bitmap
Summary: After concurrent mark abort due to Full GC G1 unnecessarily clears the next mark bitmap a second time concurrently. The Full GC mark abort procedure already did that. Before clearing the next mark bitmap, check whether mark abort occurred to avoid this work.
Reviewed-by: tbd
rev 6671 : imported patch bengt-fixes
rev 6672 : imported patch bengt-fixes2
@@ -275,13 +275,17 @@
}
}
// We now want to allow clearing of the marking bitmap to be
// suspended by a collection pause.
- {
+ // We may have aborted just before the remark. Do not bother clearing the
+ // bitmap then, as it has been done during mark abort.
+ if (!cm()->has_aborted()) {
SuspendibleThreadSetJoiner sts;
_cm->clearNextBitmap();
+ } else {
+ assert(!G1VerifyBitmaps || _cm->nextMarkBitmapIsClear(), "Next mark bitmap must be clear");
}
}
// Update the number of full collections that have been
// completed. This will also notify the FullGCCount_lock in case a