< prev index next >

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

Print this page

        

*** 184,196 **** size_t start_pos = (worker_id * len) / total_workers; size_t cur_pos = start_pos; do { HeapRegion* r = G1CollectedHeap::heap()->region_at(_collection_set_regions[cur_pos]); ! bool result = cl->do_heap_region(r); if (result) { ! cl->set_incomplete(); return; } cur_pos++; if (cur_pos == len) { cur_pos = 0; --- 184,196 ---- size_t start_pos = (worker_id * len) / total_workers; size_t cur_pos = start_pos; do { HeapRegion* r = G1CollectedHeap::heap()->region_at(_collection_set_regions[cur_pos]); ! bool result = cl->doHeapRegion(r); if (result) { ! cl->incomplete(); return; } cur_pos++; if (cur_pos == len) { cur_pos = 0;
*** 290,300 **** public: bool _valid; public: G1VerifyYoungAgesClosure() : HeapRegionClosure(), _valid(true) { } ! virtual bool do_heap_region(HeapRegion* r) { guarantee(r->is_young(), "Region must be young but is %s", r->get_type_str()); SurvRateGroup* group = r->surv_rate_group(); if (group == NULL) { --- 290,300 ---- public: bool _valid; public: G1VerifyYoungAgesClosure() : HeapRegionClosure(), _valid(true) { } ! virtual bool doHeapRegion(HeapRegion* r) { guarantee(r->is_young(), "Region must be young but is %s", r->get_type_str()); SurvRateGroup* group = r->surv_rate_group(); if (group == NULL) {
*** 330,340 **** class G1PrintCollectionSetClosure : public HeapRegionClosure { outputStream* _st; public: G1PrintCollectionSetClosure(outputStream* st) : HeapRegionClosure(), _st(st) { } ! virtual bool do_heap_region(HeapRegion* r) { assert(r->in_collection_set(), "Region %u should be in collection set", r->hrm_index()); _st->print_cr(" " HR_FORMAT ", P: " PTR_FORMAT "N: " PTR_FORMAT ", age: %4d", HR_FORMAT_PARAMS(r), p2i(r->prev_top_at_mark_start()), p2i(r->next_top_at_mark_start()), --- 330,340 ---- class G1PrintCollectionSetClosure : public HeapRegionClosure { outputStream* _st; public: G1PrintCollectionSetClosure(outputStream* st) : HeapRegionClosure(), _st(st) { } ! virtual bool doHeapRegion(HeapRegion* r) { assert(r->in_collection_set(), "Region %u should be in collection set", r->hrm_index()); _st->print_cr(" " HR_FORMAT ", P: " PTR_FORMAT "N: " PTR_FORMAT ", age: %4d", HR_FORMAT_PARAMS(r), p2i(r->prev_top_at_mark_start()), p2i(r->next_top_at_mark_start()),
*** 522,532 **** } ~G1VerifyYoungCSetIndicesClosure() { FREE_C_HEAP_ARRAY(int, _heap_region_indices); } ! virtual bool do_heap_region(HeapRegion* r) { const int idx = r->young_index_in_cset(); assert(idx > -1, "Young index must be set for all regions in the incremental collection set but is not for region %u.", r->hrm_index()); assert((size_t)idx < _young_length, "Young cset index too large for region %u", r->hrm_index()); --- 522,532 ---- } ~G1VerifyYoungCSetIndicesClosure() { FREE_C_HEAP_ARRAY(int, _heap_region_indices); } ! virtual bool doHeapRegion(HeapRegion* r) { const int idx = r->young_index_in_cset(); assert(idx > -1, "Young index must be set for all regions in the incremental collection set but is not for region %u.", r->hrm_index()); assert((size_t)idx < _young_length, "Young cset index too large for region %u", r->hrm_index());
< prev index next >