< prev index next >
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Print this page
rev 57223 : imported patch 8225484-changes-to-survivor-calculation
*** 4168,4179 ****
G1CollectedHeap* g1h = G1CollectedHeap::heap();
assert(r->in_collection_set(), "Region %u should be in collection set.", r->hrm_index());
g1h->clear_region_attr(r);
! if (r->is_young()) {
! assert(r->young_index_in_cset() != 0 && (uint)r->young_index_in_cset() <= g1h->collection_set()->young_region_length(),
"Young index %u is wrong for region %u of type %s with %u young regions",
r->young_index_in_cset(),
r->hrm_index(),
r->get_type_str(),
g1h->collection_set()->young_region_length());
--- 4168,4180 ----
G1CollectedHeap* g1h = G1CollectedHeap::heap();
assert(r->in_collection_set(), "Region %u should be in collection set.", r->hrm_index());
g1h->clear_region_attr(r);
! if (r->young_index_in_cset() != 0) {
! assert(r->is_eden(), "must be but region %u is %s", r->hrm_index(), r->get_type_str());
! assert(r->young_index_in_cset() <= g1h->collection_set()->young_region_length(),
"Young index %u is wrong for region %u of type %s with %u young regions",
r->young_index_in_cset(),
r->hrm_index(),
r->get_type_str(),
g1h->collection_set()->young_region_length());
*** 4833,4842 ****
--- 4834,4844 ----
if (dest.is_old()) {
old_set_add(alloc_region);
} else {
assert(dest.is_young(), "Retiring alloc region should be young (%d)", dest.type());
_survivor.add_used_bytes(allocated_bytes);
+ alloc_region->set_survivor_bytes(allocated_bytes);
}
bool const during_im = collector_state()->in_initial_mark_gc();
if (during_im && allocated_bytes > 0) {
_cm->root_regions()->add(alloc_region->next_top_at_mark_start(), alloc_region->top());
< prev index next >