mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8048085: Aborting marking just before remark results in useless additional clearing of the next mark bitmap
Skip clearing the next bitmap if we just recently aborted since the full GC already clears this bitmap. Reviewed-by: brutisso
This commit is contained in:
parent
1ad5cdb4a4
commit
2e37a94622
3 changed files with 14 additions and 2 deletions
|
@ -891,6 +891,10 @@ void ConcurrentMark::clearNextBitmap() {
|
|||
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 @@ void ConcurrentMark::print_stats() {
|
|||
|
||||
// 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue