src/share/vm/gc_implementation/g1/g1RemSet.cpp

Print this page
rev 5923 : 8035654: Add times for evacuation failure handling in "Other" time
Summary: Detailed breakdown of time spent in the evacuation failure handling phases to make the "Other" time roughly correspond to the sum of its parts.
Reviewed-by:

@@ -460,12 +460,13 @@
 
   DirtyCardQueueSet& into_cset_dcqs = _g1->into_cset_dirty_card_queue_set();
   int into_cset_n_buffers = into_cset_dcqs.completed_buffers_num();
 
   if (_g1->evacuation_failed()) {
-    // Restore remembered sets for the regions pointing into the collection set.
+    double restore_remembered_set_start = os::elapsedTime();
 
+    // Restore remembered sets for the regions pointing into the collection set.
     if (G1DeferredRSUpdate) {
       // If deferred RS updates are enabled then we just need to transfer
       // the completed buffers from (a) the DirtyCardQueueSet used to hold
       // cards that contain references that point into the collection set
       // to (b) the DCQS used to hold the deferred RS updates

@@ -480,10 +481,12 @@
                                                     0, 0, true)) {
         n_completed_buffers++;
       }
       assert(n_completed_buffers == into_cset_n_buffers, "missed some buffers");
     }
+
+    _g1->g1_policy()->phase_times()->record_evac_fail_restore_remsets((os::elapsedTime() - restore_remembered_set_start) * 1000.0);
   }
 
   // Free any completed buffers in the DirtyCardQueueSet used to hold cards
   // which contain references that point into the collection.
   _g1->into_cset_dirty_card_queue_set().clear();