179 if (r->is_humongous()) {
180 // There is only one object in this region and it is not garbage,
181 // so no need to coalesce or fill.
182 continue;
183 }
184
185 if (!r->oop_coalesce_and_fill(true)) {
186 // Coalesce and fill has been preempted
187 Atomic::store(&_is_preempted, true);
188 return;
189 }
190 }
191 }
192
193 // Value returned from is_completed() is only valid after all worker thread have terminated.
194 bool is_completed() {
195 return !Atomic::load(&_is_preempted);
196 }
197 };
198
199 ShenandoahOldGeneration::ShenandoahOldGeneration(uint max_queues, size_t max_capacity, size_t soft_max_capacity)
200 : ShenandoahGeneration(OLD, max_queues, max_capacity, soft_max_capacity),
201 _coalesce_and_fill_region_array(NEW_C_HEAP_ARRAY(ShenandoahHeapRegion*, ShenandoahHeap::heap()->num_regions(), mtGC)),
202 _old_heuristics(nullptr),
203 _region_balance(0),
204 _promoted_reserve(0),
205 _promoted_expended(0),
206 _promotion_potential(0),
207 _pad_for_promote_in_place(0),
208 _promotable_humongous_regions(0),
209 _promotable_regular_regions(0),
210 _is_parsable(true),
211 _card_scan(nullptr),
212 _state(WAITING_FOR_BOOTSTRAP),
213 _growth_before_compaction(INITIAL_GROWTH_BEFORE_COMPACTION),
214 _min_growth_before_compaction ((ShenandoahMinOldGenGrowthPercent * FRACTIONAL_DENOMINATOR) / 100)
215 {
216 _live_bytes_after_last_mark = ShenandoahHeap::heap()->capacity() * INITIAL_LIVE_FRACTION / FRACTIONAL_DENOMINATOR;
217 // Always clear references for old generation
218 ref_processor()->set_soft_reference_policy(true);
219
220 if (ShenandoahCardBarrier) {
|
179 if (r->is_humongous()) {
180 // There is only one object in this region and it is not garbage,
181 // so no need to coalesce or fill.
182 continue;
183 }
184
185 if (!r->oop_coalesce_and_fill(true)) {
186 // Coalesce and fill has been preempted
187 Atomic::store(&_is_preempted, true);
188 return;
189 }
190 }
191 }
192
193 // Value returned from is_completed() is only valid after all worker thread have terminated.
194 bool is_completed() {
195 return !Atomic::load(&_is_preempted);
196 }
197 };
198
199 ShenandoahOldGeneration::ShenandoahOldGeneration(uint max_queues, size_t max_capacity)
200 : ShenandoahGeneration(OLD, max_queues, max_capacity),
201 _coalesce_and_fill_region_array(NEW_C_HEAP_ARRAY(ShenandoahHeapRegion*, ShenandoahHeap::heap()->num_regions(), mtGC)),
202 _old_heuristics(nullptr),
203 _region_balance(0),
204 _promoted_reserve(0),
205 _promoted_expended(0),
206 _promotion_potential(0),
207 _pad_for_promote_in_place(0),
208 _promotable_humongous_regions(0),
209 _promotable_regular_regions(0),
210 _is_parsable(true),
211 _card_scan(nullptr),
212 _state(WAITING_FOR_BOOTSTRAP),
213 _growth_before_compaction(INITIAL_GROWTH_BEFORE_COMPACTION),
214 _min_growth_before_compaction ((ShenandoahMinOldGenGrowthPercent * FRACTIONAL_DENOMINATOR) / 100)
215 {
216 _live_bytes_after_last_mark = ShenandoahHeap::heap()->capacity() * INITIAL_LIVE_FRACTION / FRACTIONAL_DENOMINATOR;
217 // Always clear references for old generation
218 ref_processor()->set_soft_reference_policy(true);
219
220 if (ShenandoahCardBarrier) {
|