Mercurial > hg > graal-compiler
diff src/share/vm/gc_implementation/g1/concurrentMark.cpp @ 20293:7df07d855c8e
8048085: Aborting marking just before remark results in useless additional clearing of the next mark bitmap
Summary: Skip clearing the next bitmap if we just recently aborted since the full GC already clears this bitmap.
Reviewed-by: brutisso
author | tschatzl |
---|---|
date | Mon, 21 Jul 2014 09:59:46 +0200 |
parents | e0954897238a |
children | ca8b8e21e2ca |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp Mon Jul 21 09:59:37 2014 +0200 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp Mon Jul 21 09:59:46 2014 +0200 @@ -890,6 +890,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) { @@ -3362,7 +3366,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