< prev index next >

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

Print this page
rev 60594 : [mq]: 8240556-abort-conc-mark-new

@@ -661,11 +661,11 @@
   _survivors_age_table.clear();
 
   assert(_g1h->collection_set()->verify_young_ages(), "region age verification failed");
 }
 
-void G1Policy::record_concurrent_mark_init_end(double mark_init_elapsed_time_ms) {
+void G1Policy::record_concurrent_mark_init_end() {
   assert(!collector_state()->initiate_conc_mark_if_possible(), "we should have cleared it by now");
   collector_state()->set_in_concurrent_start_gc(false);
 }
 
 void G1Policy::record_concurrent_mark_remark_start() {

@@ -746,11 +746,11 @@
 }
 
 // Anything below that is considered to be zero
 #define MIN_TIMER_GRANULARITY 0.0000001
 
-void G1Policy::record_collection_pause_end(double pause_time_ms) {
+void G1Policy::record_collection_pause_end(double pause_time_ms, bool start_concurrent_mark_cycle) {
   G1GCPhaseTimes* p = phase_times();
 
   double end_time_sec = os::elapsedTime();
 
   PauseKind this_pause = young_gc_pause_kind();

@@ -758,11 +758,11 @@
   bool update_stats = !_g1h->evacuation_failed();
 
   record_pause(this_pause, end_time_sec - pause_time_ms / 1000.0, end_time_sec);
 
   if (is_concurrent_start_pause(this_pause)) {
-    record_concurrent_mark_init_end(0.0);
+    record_concurrent_mark_init_end();
   } else {
     maybe_start_marking();
   }
 
   double app_time_ms = (phase_times()->cur_collection_start_sec() * 1000.0 - _analytics->prev_collection_pause_end_ms());

@@ -898,11 +898,14 @@
   }
 
   assert(!(is_concurrent_start_pause(this_pause) && collector_state()->mark_or_rebuild_in_progress()),
          "If the last pause has been concurrent start, we should not have been in the marking window");
   if (is_concurrent_start_pause(this_pause)) {
-    collector_state()->set_mark_or_rebuild_in_progress(true);
+    if (!start_concurrent_mark_cycle) {
+      abort_time_to_mixed_tracking();
+    }
+    collector_state()->set_mark_or_rebuild_in_progress(start_concurrent_mark_cycle);
   }
 
   _free_regions_at_end_of_collection = _g1h->num_free_regions();
 
   update_rs_length_prediction();

@@ -923,11 +926,11 @@
     // measurement. Periodic collection typically means that the application is "inactive", i.e.
     // the marking threads may have received an uncharacterisic amount of cpu time
     // for completing the marking, i.e. are faster than expected.
     // This skews the predicted marking length towards smaller values which might cause
     // the mark start being too late.
-    _concurrent_start_to_mixed.reset();
+    abort_time_to_mixed_tracking();
   }
 
   // Note that _mmu_tracker->max_gc_time() returns the time in seconds.
   double scan_logged_cards_time_goal_ms = _mmu_tracker->max_gc_time() * MILLIUNITS * G1RSetUpdatingPauseTimePercent / 100.0;
 
< prev index next >