< prev index next >

src/hotspot/share/gc/g1/g1RemSet.cpp

Print this page
rev 49539 : imported patch 8178105-switch-at-remark
rev 49542 : imported patch 8178105-8200371-assert-problem

*** 841,851 **** // the same as bottom or top(_at_rebuild_start). There is no way TAMS has a different // value: this would mean that TAMS points somewhere into the object. assert(hr->top() == top_at_mark_start || hr->top() == top_at_rebuild_start, "More than one object in the humongous region?"); humongous_obj->oop_iterate(&_update_cl, mr); ! return top_at_mark_start != hr->bottom() ? mr.byte_size() : 0; } else { return 0; } } --- 841,851 ---- // the same as bottom or top(_at_rebuild_start). There is no way TAMS has a different // value: this would mean that TAMS points somewhere into the object. assert(hr->top() == top_at_mark_start || hr->top() == top_at_rebuild_start, "More than one object in the humongous region?"); humongous_obj->oop_iterate(&_update_cl, mr); ! return top_at_mark_start != hr->bottom() ? mr.intersection(MemRegion((HeapWord*)humongous_obj, humongous_obj->size())).byte_size() : 0; } else { return 0; } }
*** 880,890 **** p2i(top_at_rebuild_start_check), p2i(hr->bottom()), region_idx, hr->get_type_str()); size_t total_marked_bytes = 0; size_t const chunk_size_in_words = G1RebuildRemSetChunkSize / HeapWordSize; ! HeapWord* const top_at_mark_start = hr->next_top_at_mark_start(); HeapWord* cur = hr->bottom(); while (cur < hr->end()) { // After every iteration (yield point) we need to check whether the region's // TARS changed due to e.g. eager reclaim. --- 880,890 ---- p2i(top_at_rebuild_start_check), p2i(hr->bottom()), region_idx, hr->get_type_str()); size_t total_marked_bytes = 0; size_t const chunk_size_in_words = G1RebuildRemSetChunkSize / HeapWordSize; ! HeapWord* const top_at_mark_start = hr->prev_top_at_mark_start(); HeapWord* cur = hr->bottom(); while (cur < hr->end()) { // After every iteration (yield point) we need to check whether the region's // TARS changed due to e.g. eager reclaim.
*** 897,907 **** if (next_chunk.is_empty()) { break; } const Ticks start = Ticks::now(); ! size_t marked_bytes = rebuild_rem_set_in_region(_cm->next_mark_bitmap(), top_at_mark_start, top_at_rebuild_start, hr, next_chunk); Tickspan time = Ticks::now() - start; --- 897,907 ---- if (next_chunk.is_empty()) { break; } const Ticks start = Ticks::now(); ! size_t marked_bytes = rebuild_rem_set_in_region(_cm->prev_mark_bitmap(), top_at_mark_start, top_at_rebuild_start, hr, next_chunk); Tickspan time = Ticks::now() - start;
*** 920,930 **** p2i(hr->bottom()), p2i(top_at_mark_start), p2i(top_at_rebuild_start)); if (marked_bytes > 0) { - hr->add_to_marked_bytes(marked_bytes); total_marked_bytes += marked_bytes; } cur += chunk_size_in_words; _cm->do_yield_check(); --- 920,929 ----
*** 934,949 **** } // In the final iteration of the loop the region might have been eagerly reclaimed. // Simply filter out those regions. We can not just use region type because there // might have already been new allocations into these regions. DEBUG_ONLY(HeapWord* const top_at_rebuild_start = _cm->top_at_rebuild_start(region_idx);) ! assert(!hr->is_old() || ! top_at_rebuild_start == NULL || ! total_marked_bytes == _cm->liveness(region_idx) * HeapWordSize, ! "Marked bytes " SIZE_FORMAT " for region %u (%s) in [bottom, TAMS) do not match liveness during mark " SIZE_FORMAT " " "(" PTR_FORMAT " " PTR_FORMAT " " PTR_FORMAT ")", ! total_marked_bytes, hr->hrm_index(), hr->get_type_str(), _cm->liveness(region_idx) * HeapWordSize, p2i(hr->bottom()), p2i(top_at_mark_start), p2i(top_at_rebuild_start)); // Abort state may have changed after the yield check. return _cm->has_aborted(); } }; --- 933,947 ---- } // In the final iteration of the loop the region might have been eagerly reclaimed. // Simply filter out those regions. We can not just use region type because there // might have already been new allocations into these regions. DEBUG_ONLY(HeapWord* const top_at_rebuild_start = _cm->top_at_rebuild_start(region_idx);) ! assert(top_at_rebuild_start == NULL || ! total_marked_bytes == hr->marked_bytes(), ! "Marked bytes " SIZE_FORMAT " for region %u (%s) in [bottom, TAMS) do not match calculated marked bytes " SIZE_FORMAT " " "(" PTR_FORMAT " " PTR_FORMAT " " PTR_FORMAT ")", ! total_marked_bytes, hr->hrm_index(), hr->get_type_str(), hr->marked_bytes(), p2i(hr->bottom()), p2i(top_at_mark_start), p2i(top_at_rebuild_start)); // Abort state may have changed after the yield check. return _cm->has_aborted(); } };
< prev index next >