RFR: Cleanup: update-refs check in_collection_set twice
Aleksey Shipilev
shade at redhat.com
Fri May 12 10:47:06 UTC 2017
Hi,
Minor cleanup in update-refs handling, do in_collection_set check once:
diff -r d5d4cc781486 src/share/vm/gc/shenandoah/shenandoahHeap.cpp
--- a/src/share/vm/gc/shenandoah/shenandoahHeap.cpp Thu May 11 21:14:39 2017 +0200
+++ b/src/share/vm/gc/shenandoah/shenandoahHeap.cpp Fri May 12 12:43:18 2017 +0200
@@ -2400,15 +2400,16 @@
void work(uint worker_id) {
ShenandoahHeapRegion* r = _regions->claim_next();
while (r != NULL) {
- if (! _heap->in_collection_set(r) &&
- ! r->is_empty()) {
- _heap->marked_object_oop_safe_iterate(r, &cl);
- } else if (_heap->in_collection_set(r)) {
+ if (_heap->in_collection_set(r)) {
HeapWord* bottom = r->bottom();
HeapWord* top = _heap->complete_top_at_mark_start(r->bottom());
if (top > bottom) {
_heap->complete_mark_bit_map()->clear_range_large(MemRegion(bottom,
top));
}
+ } else {
+ if (!r->is_empty()) {
+ _heap->marked_object_oop_safe_iterate(r, &cl);
+ }
}
if (_heap->cancelled_concgc()) {
return;
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list