Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp @ 1390:f9ec1e4bbb44
6939027: G1: assertion failure during the concurrent phase of cleanup
Summary: The outgoing region map is not maintained properly and it's causing an assert failure. Given that we don't actually use it, I'm removing it. I'm piggy-backing a small change on this which removes a message that it's printed before a Full GC when DisableExplicitGC is set.
Reviewed-by: apetrusenko, ysr
author | tonyp |
---|---|
date | Thu, 15 Apr 2010 18:45:30 -0400 |
parents | 0414c1049f15 |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
1389:5dbd9300cf9c | 1390:f9ec1e4bbb44 |
---|---|
660 prt = delete_region_table(); | 660 prt = delete_region_table(); |
661 } else { | 661 } else { |
662 prt = PosParPRT::alloc(from_hr); | 662 prt = PosParPRT::alloc(from_hr); |
663 } | 663 } |
664 prt->init(from_hr); | 664 prt->init(from_hr); |
665 // Record the outgoing pointer in the from_region's outgoing bitmap. | |
666 from_hr->rem_set()->add_outgoing_reference(hr()); | |
667 | 665 |
668 PosParPRT* first_prt = _fine_grain_regions[ind]; | 666 PosParPRT* first_prt = _fine_grain_regions[ind]; |
669 prt->set_next(first_prt); // XXX Maybe move to init? | 667 prt->set_next(first_prt); // XXX Maybe move to init? |
670 _fine_grain_regions[ind] = prt; | 668 _fine_grain_regions[ind] = prt; |
671 _n_fine_entries++; | 669 _n_fine_entries++; |
1071 return (int)MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), ParallelGCThreads); | 1069 return (int)MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), ParallelGCThreads); |
1072 } | 1070 } |
1073 | 1071 |
1074 HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa, | 1072 HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa, |
1075 HeapRegion* hr) | 1073 HeapRegion* hr) |
1076 : _bosa(bosa), _other_regions(hr), | 1074 : _bosa(bosa), _other_regions(hr), _iter_state(Unclaimed) { } |
1077 _outgoing_region_map(G1CollectedHeap::heap()->max_regions(), | |
1078 false /* in-resource-area */), | |
1079 _iter_state(Unclaimed) | |
1080 {} | |
1081 | 1075 |
1082 | 1076 |
1083 void HeapRegionRemSet::setup_remset_size() { | 1077 void HeapRegionRemSet::setup_remset_size() { |
1084 // Setup sparse and fine-grain tables sizes. | 1078 // Setup sparse and fine-grain tables sizes. |
1085 // table_size = base * (log(region_size / 1M) + 1) | 1079 // table_size = base * (log(region_size / 1M) + 1) |
1146 | 1140 |
1147 void HeapRegionRemSet::par_cleanup() { | 1141 void HeapRegionRemSet::par_cleanup() { |
1148 PosParPRT::par_contract_all(); | 1142 PosParPRT::par_contract_all(); |
1149 } | 1143 } |
1150 | 1144 |
1151 void HeapRegionRemSet::add_outgoing_reference(HeapRegion* to_hr) { | |
1152 _outgoing_region_map.par_at_put(to_hr->hrs_index(), 1); | |
1153 } | |
1154 | |
1155 void HeapRegionRemSet::clear() { | 1145 void HeapRegionRemSet::clear() { |
1156 clear_outgoing_entries(); | |
1157 _outgoing_region_map.clear(); | |
1158 _other_regions.clear(); | 1146 _other_regions.clear(); |
1159 assert(occupied() == 0, "Should be clear."); | 1147 assert(occupied() == 0, "Should be clear."); |
1160 } | 1148 } |
1161 | |
1162 void HeapRegionRemSet::clear_outgoing_entries() { | |
1163 G1CollectedHeap* g1h = G1CollectedHeap::heap(); | |
1164 size_t i = _outgoing_region_map.get_next_one_offset(0); | |
1165 while (i < _outgoing_region_map.size()) { | |
1166 HeapRegion* to_region = g1h->region_at(i); | |
1167 if (!to_region->in_collection_set()) { | |
1168 to_region->rem_set()->clear_incoming_entry(hr()); | |
1169 } | |
1170 i = _outgoing_region_map.get_next_one_offset(i+1); | |
1171 } | |
1172 } | |
1173 | |
1174 | 1149 |
1175 void HeapRegionRemSet::scrub(CardTableModRefBS* ctbs, | 1150 void HeapRegionRemSet::scrub(CardTableModRefBS* ctbs, |
1176 BitMap* region_bm, BitMap* card_bm) { | 1151 BitMap* region_bm, BitMap* card_bm) { |
1177 _other_regions.scrub(ctbs, region_bm, card_bm); | 1152 _other_regions.scrub(ctbs, region_bm, card_bm); |
1178 } | 1153 } |