8176885: Clear Claimed Marks log message at wrong location in the log
authortschatzl
Tue, 28 Mar 2017 09:13:00 +0200
changeset 46353 1df99120f158
parent 46352 4ece6d1f3f76
child 46354 dedf3d5f3332
child 46356 46e3aa269de0
8176885: Clear Claimed Marks log message at wrong location in the log Summary: Move message and code to the pre evacuation phase part of the GC Reviewed-by: sjohanss, sangheki
hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp
hotspot/src/share/vm/gc/g1/g1GCPhaseTimes.cpp
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Tue Mar 28 00:03:23 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Tue Mar 28 09:13:00 2017 +0200
@@ -4429,13 +4429,6 @@
 
   g1_rem_set()->prepare_for_oops_into_collection_set_do();
   _preserved_marks_set.assert_empty();
-}
-
-void G1CollectedHeap::evacuate_collection_set(EvacuationInfo& evacuation_info, G1ParScanThreadStateSet* per_thread_states) {
-  // Should G1EvacuationFailureALot be in effect for this GC?
-  NOT_PRODUCT(set_evacuation_failure_alot_for_current_gc();)
-
-  assert(dirty_card_queue_set().completed_buffers_num() == 0, "Should be empty");
 
   G1GCPhaseTimes* phase_times = g1_policy()->phase_times();
 
@@ -4448,6 +4441,15 @@
     double recorded_clear_claimed_marks_time_ms = (os::elapsedTime() - start_clear_claimed_marks) * 1000.0;
     phase_times->record_clear_claimed_marks_time_ms(recorded_clear_claimed_marks_time_ms);
   }
+}
+
+void G1CollectedHeap::evacuate_collection_set(EvacuationInfo& evacuation_info, G1ParScanThreadStateSet* per_thread_states) {
+  // Should G1EvacuationFailureALot be in effect for this GC?
+  NOT_PRODUCT(set_evacuation_failure_alot_for_current_gc();)
+
+  assert(dirty_card_queue_set().completed_buffers_num() == 0, "Should be empty");
+
+  G1GCPhaseTimes* phase_times = g1_policy()->phase_times();
 
   double start_par_time_sec = os::elapsedTime();
   double end_par_time_sec;
--- a/hotspot/src/share/vm/gc/g1/g1GCPhaseTimes.cpp	Tue Mar 28 00:03:23 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1GCPhaseTimes.cpp	Tue Mar 28 09:13:00 2017 +0200
@@ -285,7 +285,8 @@
   const double sum_ms = _root_region_scan_wait_time_ms +
                         _recorded_young_cset_choice_time_ms +
                         _recorded_non_young_cset_choice_time_ms +
-                        _cur_fast_reclaim_humongous_register_time_ms;
+                        _cur_fast_reclaim_humongous_register_time_ms +
+                        _recorded_clear_claimed_marks_time_ms;
 
   info_time("Pre Evacuate Collection Set", sum_ms);
 
@@ -300,6 +301,9 @@
     trace_count("Humongous Candidate", _cur_fast_reclaim_humongous_candidates);
   }
 
+  if (_recorded_clear_claimed_marks_time_ms > 0.0) {
+    debug_time("Clear Claimed Marks", _recorded_clear_claimed_marks_time_ms);
+  }
   return sum_ms;
 }
 
@@ -344,7 +348,6 @@
                         _recorded_merge_pss_time_ms +
                         _cur_strong_code_root_purge_time_ms +
                         _recorded_redirty_logged_cards_time_ms +
-                        _recorded_clear_claimed_marks_time_ms +
                         _recorded_total_free_cset_time_ms +
                         _cur_fast_reclaim_humongous_time_ms +
                         _cur_expand_heap_time_ms +
@@ -384,9 +387,6 @@
 #if defined(COMPILER2) || INCLUDE_JVMCI
   debug_time("DerivedPointerTable Update", _cur_derived_pointer_table_update_time_ms);
 #endif
-  if (_recorded_clear_claimed_marks_time_ms > 0.0) {
-    debug_time("Clear Claimed Marks", _recorded_clear_claimed_marks_time_ms);
-  }
 
   debug_time("Free Collection Set", _recorded_total_free_cset_time_ms);
   trace_time("Free Collection Set Serial", _recorded_serial_free_cset_time_ms);