< prev index next >
src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
Print this page
rev 49502 : imported patch 8199742-collectorstate-fixes
rev 49504 : imported patch 8151171-renamings
rev 49505 : [mq]: 8151171-stefanj-review
rev 49506 : imported patch 8200234-g1concurrentmark-refactorings
rev 49507 : imported patch 8200234-stefanj-review
rev 49510 : 8200255: Remove G1CMTask::_concurrent
Reviewed-by: sangheki, sjohanss
rev 49511 : 8200074: Remove G1ConcurrentMark::_concurrent_marking_in_progress
Reviewed-by: sjohanss, sangheki
rev 49512 : imported patch 8200305-gc,liveness-output
rev 49513 : [mq]: 8200385-prev-bitmap-marks-left
@@ -527,20 +527,26 @@
} else {
clear_statistics_in_region(region_idx);
}
}
+static void maybe_clear_bitmap_if_set(G1CMBitMap* bitmap, HeapWord* addr) {
+ if (bitmap->is_marked(addr)) {
+ bitmap->clear(addr);
+ }
+}
+
void G1ConcurrentMark::humongous_object_eagerly_reclaimed(HeapRegion* r) {
assert_at_safepoint_on_vm_thread();
- // Need to clear mark bit of the humongous object.
- if (_next_mark_bitmap->is_marked(r->bottom())) {
- _next_mark_bitmap->clear(r->bottom());
- }
+ // Need to clear all mark bits of the humongous object.
+ maybe_clear_bitmap_if_set(_prev_mark_bitmap, r->bottom());
- if (!_g1h->collector_state()->mark_or_rebuild_in_progress()) {
- return;
+ G1CollectorState* collector_state = _g1h->collector_state();
+ if (collector_state->mark_or_rebuild_in_progress() ||
+ collector_state->clearing_next_bitmap()) {
+ maybe_clear_bitmap_if_set(_next_mark_bitmap, r->bottom());
}
// Clear any statistics about the region gathered so far.
clear_statistics(r);
}
< prev index next >