< prev index next >
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Print this page
rev 52719 : [mq]: 8159440-marking-of-promoted-objects-to-concurrent
@@ -4518,26 +4518,27 @@
new_alloc_region->set_old();
_verifier->check_bitmaps("Old Region Allocation", new_alloc_region);
}
_g1_policy->remset_tracker()->update_at_allocate(new_alloc_region);
_hr_printer.alloc(new_alloc_region);
- bool during_im = collector_state()->in_initial_mark_gc();
- new_alloc_region->note_start_of_copying(during_im);
return new_alloc_region;
}
return NULL;
}
void G1CollectedHeap::retire_gc_alloc_region(HeapRegion* alloc_region,
size_t allocated_bytes,
InCSetState dest) {
- bool during_im = collector_state()->in_initial_mark_gc();
- alloc_region->note_end_of_copying(during_im);
g1_policy()->record_bytes_copied_during_gc(allocated_bytes);
if (dest.is_old()) {
old_set_add(alloc_region);
}
+
+ bool const during_im = collector_state()->in_initial_mark_gc();
+ if (during_im && allocated_bytes > 0) {
+ _cm->root_regions()->add(alloc_region);
+ }
_hr_printer.retire(alloc_region);
}
HeapRegion* G1CollectedHeap::alloc_highest_free_region() {
bool expanded = false;
< prev index next >