< prev index next >

src/hotspot/share/gc/g1/g1Policy.cpp

Print this page
rev 60061 : imported patch 8210462-kbarrett-review

@@ -677,20 +677,22 @@
     // This has been the young GC before we start doing mixed GCs. We already
     // decided to start mixed GCs much earlier, so there is nothing to do except
     // advancing the state.
     collector_state()->set_in_young_only_phase(false);
     collector_state()->set_in_young_gc_before_mixed(false);
-  } else if (!is_young_only_pause(this_pause)) {
+  } else if (is_mixed_pause(this_pause)) {
     // This is a mixed GC. Here we decide whether to continue doing more
     // mixed GCs or not.
     if (!next_gc_should_be_mixed("continue mixed GCs",
                                  "do not continue mixed GCs")) {
       collector_state()->set_in_young_only_phase(true);
 
       clear_collection_set_candidates();
       maybe_start_marking();
     }
+  } else {
+    assert(is_young_only_pause(this_pause), "must be");
   }
 
   _eden_surv_rate_group->start_adding_regions();
 
   double merge_hcc_time_ms = average_time_ms(G1GCPhaseTimes::MergeHCC);

@@ -1156,10 +1158,17 @@
   assert(kind != Remark, "must be");
   assert(kind != Cleanup, "must be");
   return kind == ConcurrentStartGC || kind == LastYoungGC || kind == YoungOnlyGC;
 }
 
+bool G1Policy::is_mixed_pause(PauseKind kind) {
+  assert(kind != FullGC, "must be");
+  assert(kind != Remark, "must be");
+  assert(kind != Cleanup, "must be");
+  return kind == MixedGC;
+}
+
 bool G1Policy::is_last_young_pause(PauseKind kind) {
   return kind == LastYoungGC;
 }
 
 bool G1Policy::is_concurrent_start_pause(PauseKind kind) {
< prev index next >