245 bool default_value() const { return false; }
246 public:
247 void clear() { G1BiasedMappedArray<bool>::clear(); }
248 void set_candidate(uint region, bool value) {
249 set_by_index(region, value);
250 }
251 bool is_candidate(uint region) {
252 return get_by_index(region);
253 }
254 };
255
256 HumongousReclaimCandidates _humongous_reclaim_candidates;
257 // Stores whether during humongous object registration we found candidate regions.
258 // If not, we can skip a few steps.
259 bool _has_humongous_reclaim_candidates;
260
261 G1HRPrinter _hr_printer;
262
263 // Return true if an explicit GC should start a concurrent cycle instead
264 // of doing a STW full GC. A concurrent cycle should be started if:
265 // (a) cause == _gc_locker and +GCLockerInvokesConcurrent,
266 // (b) cause == _g1_humongous_allocation,
267 // (c) cause == _java_lang_system_gc and +ExplicitGCInvokesConcurrent,
268 // (d) cause == _dcmd_gc_run and +ExplicitGCInvokesConcurrent,
269 // (e) cause == _wb_conc_mark,
270 // (f) cause == _g1_periodic_collection and +G1PeriodicGCInvokesConcurrent.
271 bool should_do_concurrent_full_gc(GCCause::Cause cause);
272
273 // Attempt to start a concurrent cycle with the indicated cause.
274 // precondition: should_do_concurrent_full_gc(cause)
275 bool try_collect_concurrently(GCCause::Cause cause,
276 uint gc_counter,
277 uint old_marking_started_before);
278
279 // Return true if should upgrade to full gc after an incremental one.
280 bool should_upgrade_to_full_gc(GCCause::Cause cause);
281
282 // indicates whether we are in young or mixed GC mode
283 G1CollectorState _collector_state;
284
285 // Keeps track of how many "old marking cycles" (i.e., Full GCs or
286 // concurrent cycles) we have started.
287 volatile uint _old_marking_cycles_started;
288
289 // Keeps track of how many "old marking cycles" (i.e., Full GCs or
290 // concurrent cycles) we have completed.
|
245 bool default_value() const { return false; }
246 public:
247 void clear() { G1BiasedMappedArray<bool>::clear(); }
248 void set_candidate(uint region, bool value) {
249 set_by_index(region, value);
250 }
251 bool is_candidate(uint region) {
252 return get_by_index(region);
253 }
254 };
255
256 HumongousReclaimCandidates _humongous_reclaim_candidates;
257 // Stores whether during humongous object registration we found candidate regions.
258 // If not, we can skip a few steps.
259 bool _has_humongous_reclaim_candidates;
260
261 G1HRPrinter _hr_printer;
262
263 // Return true if an explicit GC should start a concurrent cycle instead
264 // of doing a STW full GC. A concurrent cycle should be started if:
265 // (a) cause == _g1_humongous_allocation,
266 // (b) cause == _java_lang_system_gc and +ExplicitGCInvokesConcurrent,
267 // (c) cause == _dcmd_gc_run and +ExplicitGCInvokesConcurrent,
268 // (d) cause == _wb_conc_mark,
269 // (e) cause == _g1_periodic_collection and +G1PeriodicGCInvokesConcurrent.
270 bool should_do_concurrent_full_gc(GCCause::Cause cause);
271
272 // Attempt to start a concurrent cycle with the indicated cause.
273 // precondition: should_do_concurrent_full_gc(cause)
274 bool try_collect_concurrently(GCCause::Cause cause,
275 uint gc_counter,
276 uint old_marking_started_before);
277
278 // Return true if should upgrade to full gc after an incremental one.
279 bool should_upgrade_to_full_gc(GCCause::Cause cause);
280
281 // indicates whether we are in young or mixed GC mode
282 G1CollectorState _collector_state;
283
284 // Keeps track of how many "old marking cycles" (i.e., Full GCs or
285 // concurrent cycles) we have started.
286 volatile uint _old_marking_cycles_started;
287
288 // Keeps track of how many "old marking cycles" (i.e., Full GCs or
289 // concurrent cycles) we have completed.
|