8177453: Start_new_collection_set() timing done during wrong type of GC
authortschatzl
Fri, 24 Mar 2017 10:26:58 +0100
changeset 46347 32a6f2c6330c
parent 46346 4085295dcf51
child 46348 5803de68c14d
8177453: Start_new_collection_set() timing done during wrong type of GC Summary: Move timing code from full gc to young gc. Reviewed-by: sjohanss, mgerdin
hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Thu Mar 23 11:10:55 2017 -0700
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Fri Mar 24 10:26:58 2017 +0100
@@ -1378,9 +1378,7 @@
       }
       _verifier->check_bitmaps("Full GC End");
 
-      double start = os::elapsedTime();
       start_new_collection_set();
-      g1_policy()->phase_times()->record_start_new_cset_time_ms((os::elapsedTime() - start) * 1000.0);
 
       _allocator->init_mutator_alloc_region();
 
@@ -3212,7 +3210,9 @@
         _survivor_evac_stats.adjust_desired_plab_sz();
         _old_evac_stats.adjust_desired_plab_sz();
 
+        double start = os::elapsedTime();
         start_new_collection_set();
+        g1_policy()->phase_times()->record_start_new_cset_time_ms((os::elapsedTime() - start) * 1000.0);
 
         if (evacuation_failed()) {
           set_used(recalculate_used());