< prev index next >

src/share/vm/gc/g1/g1CollectedHeap.hpp

Print this page
rev 9404 : 8143251: HeapRetentionTest.java Test is failing on jdk9/dev
Reviewed-by:

@@ -242,13 +242,17 @@
 
   // It decides whether an explicit GC should start a concurrent cycle
   // instead of doing a STW GC. Currently, a concurrent cycle is
   // explicitly started if:
   // (a) cause == _gc_locker and +GCLockerInvokesConcurrent, or
-  // (b) cause == _java_lang_system_gc and +ExplicitGCInvokesConcurrent.
-  // (c) cause == _dcmd_gc_run and +ExplicitGCInvokesConcurrent.
-  // (d) cause == _g1_humongous_allocation
+  // (b) cause == _g1_humongous_allocation
+  // These are defined in user_requested_concurrent_full_gc() because
+  // these sometimes need to be treated differently:
+  // (c) cause == _java_lang_system_gc and +ExplicitGCInvokesConcurrent.
+  // (d) cause == _dcmd_gc_run and +ExplicitGCInvokesConcurrent.
+  // (e) cause == _update_allocation_context_stats_inc
+  // (f) cause == _wb_conc_mark
   bool should_do_concurrent_full_gc(GCCause::Cause cause);
 
   // indicates whether we are in young or mixed GC mode
   G1CollectorState _collector_state;
 

@@ -580,10 +584,15 @@
 
   void clear_cset_fast_test() {
     _in_cset_fast_test.clear();
   }
 
+  // A complement to should_do_concurrent_full_gc. GCs caused
+  // by a user sometimes needs to be treated differently
+  // from those caused by the VM.
+  bool user_requested_concurrent_full_gc(GCCause::Cause cause);
+
   // This is called at the start of either a concurrent cycle or a Full
   // GC to update the number of old marking cycles started.
   void increment_old_marking_cycles_started();
 
   // This is called at the end of either a concurrent cycle or a Full
< prev index next >