< prev index next >
src/hotspot/share/gc/g1/g1CollectedHeap.hpp
Print this page
rev 56783 : [mq]: simplify
*** 130,139 ****
--- 130,140 ----
class G1CollectedHeap : public CollectedHeap {
friend class VM_CollectForMetadataAllocation;
friend class VM_G1CollectForAllocation;
friend class VM_G1CollectFull;
+ friend class VM_G1TryInitiateConcMark;
friend class VMStructs;
friend class MutatorAllocRegion;
friend class G1FullCollector;
friend class G1GCAllocRegion;
friend class G1HeapVerifier;
*** 263,272 ****
--- 264,279 ----
// (c) cause == _java_lang_system_gc and +ExplicitGCInvokesConcurrent.
// (d) cause == _dcmd_gc_run and +ExplicitGCInvokesConcurrent.
// (e) cause == _wb_conc_mark
bool should_do_concurrent_full_gc(GCCause::Cause cause);
+ // Attempt to start a concurrent cycle with the indicated cause.
+ // precondition: should_do_concurrent_full_gc(cause)
+ bool try_collect_concurrently(GCCause::Cause cause,
+ uint gc_counter,
+ uint old_marking_started_before);
+
// Return true if should upgrade to full gc after an incremental one.
bool should_upgrade_to_full_gc(GCCause::Cause cause);
// indicates whether we are in young or mixed GC mode
G1CollectorState _collector_state;
*** 615,625 ****
// tighter consistency checking in the method. If concurrent is
// false, the caller is the inner caller in the nesting (i.e., the
// Full GC). If concurrent is true, the caller is the outer caller
// in this nesting (i.e., the concurrent cycle). Further nesting is
// not currently supported. The end of this call also notifies
! // the FullGCCount_lock in case a Java thread is waiting for a full
// GC to happen (e.g., it called System.gc() with
// +ExplicitGCInvokesConcurrent).
void increment_old_marking_cycles_completed(bool concurrent);
uint old_marking_cycles_completed() {
--- 622,632 ----
// tighter consistency checking in the method. If concurrent is
// false, the caller is the inner caller in the nesting (i.e., the
// Full GC). If concurrent is true, the caller is the outer caller
// in this nesting (i.e., the concurrent cycle). Further nesting is
// not currently supported. The end of this call also notifies
! // the G1FullGCCount_lock in case a Java thread is waiting for a full
// GC to happen (e.g., it called System.gc() with
// +ExplicitGCInvokesConcurrent).
void increment_old_marking_cycles_completed(bool concurrent);
uint old_marking_cycles_completed() {
*** 1073,1086 ****
// Perform a collection of the heap; intended for use in implementing
// "System.gc". This probably implies as full a collection as the
// "CollectedHeap" supports.
virtual void collect(GCCause::Cause cause);
! // Perform a collection of the heap with the given cause; if the VM operation
! // fails to execute for any reason, retry only if retry_on_gc_failure is set.
// Returns whether this collection actually executed.
! bool try_collect(GCCause::Cause cause, bool retry_on_gc_failure);
// True iff an evacuation has failed in the most-recent collection.
bool evacuation_failed() { return _evacuation_failed; }
void remove_from_old_sets(const uint old_regions_removed, const uint humongous_regions_removed);
--- 1080,1092 ----
// Perform a collection of the heap; intended for use in implementing
// "System.gc". This probably implies as full a collection as the
// "CollectedHeap" supports.
virtual void collect(GCCause::Cause cause);
! // Perform a collection of the heap with the given cause.
// Returns whether this collection actually executed.
! bool try_collect(GCCause::Cause cause);
// True iff an evacuation has failed in the most-recent collection.
bool evacuation_failed() { return _evacuation_failed; }
void remove_from_old_sets(const uint old_regions_removed, const uint humongous_regions_removed);
< prev index next >