hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
changeset 25728 7f8a76e3baa8
parent 25492 d27050bdfb04
child 25893 b4141bec6a67
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Mon Jul 21 09:59:37 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Mon Jul 21 09:59:46 2014 +0200
@@ -891,6 +891,10 @@
   guarantee(!g1h->mark_in_progress(), "invariant");
 }
 
+bool ConcurrentMark::nextMarkBitmapIsClear() {
+  return _nextMarkBitMap->getNextMarkedWordAddress(_heap_start, _heap_end) == _heap_end;
+}
+
 class NoteStartOfMarkHRClosure: public HeapRegionClosure {
 public:
   bool doHeapRegion(HeapRegion* r) {
@@ -3358,7 +3362,8 @@
 
 // abandon current marking iteration due to a Full GC
 void ConcurrentMark::abort() {
-  // Clear all marks to force marking thread to do nothing
+  // Clear all marks in the next bitmap for the next marking cycle. This will allow us to skip the next
+  // concurrent bitmap clearing.
   _nextMarkBitMap->clearAll();
 
   // Note we cannot clear the previous marking bitmap here