changeset 60747:a4699cc7a8ad

8242083: Shenandoah: split "Prepare Evacuation" tracking into cset/freeset counters Reviewed-by: rkennke
author shade
date Fri, 03 Apr 2020 13:58:32 +0200
parents f8b15395138c
children 8e43e6b3f957
files src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp
diffstat 2 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Thu Apr 02 12:44:05 2020 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Fri Apr 03 13:58:32 2020 +0200
@@ -1501,14 +1501,15 @@
     }
 
     {
-      ShenandoahGCPhase phase(ShenandoahPhaseTimings::prepare_evac);
-
+      ShenandoahGCPhase phase(ShenandoahPhaseTimings::choose_cset);
       ShenandoahHeapLocker locker(lock());
       _collection_set->clear();
-      _free_set->clear();
-
       heuristics()->choose_collection_set(_collection_set);
-
+    }
+
+    {
+      ShenandoahGCPhase phase(ShenandoahPhaseTimings::final_rebuild_freeset);
+      ShenandoahHeapLocker locker(lock());
       _free_set->rebuild();
     }
 
@@ -2512,6 +2513,7 @@
   }
 
   {
+    ShenandoahGCPhase phase(ShenandoahPhaseTimings::final_update_refs_rebuild_freeset);
     ShenandoahHeapLocker locker(lock());
     _free_set->rebuild();
   }
--- a/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp	Thu Apr 02 12:44:05 2020 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp	Fri Apr 03 13:58:32 2020 +0200
@@ -82,7 +82,8 @@
   f(complete_liveness,                              "  Complete Liveness")             \
   f(retire_tlabs,                                   "  Retire TLABs")                  \
   f(sync_pinned,                                    "  Sync Pinned")                   \
-  f(prepare_evac,                                   "  Prepare Evacuation")            \
+  f(choose_cset,                                    "  Choose Collection Set")         \
+  f(final_rebuild_freeset,                          "  Rebuild Free Set")              \
   f(init_evac,                                      "  Initial Evacuation")            \
   SHENANDOAH_GC_PAR_PHASE_DO(evac_,                 "    E: ", f)                      \
                                                                                        \
@@ -97,7 +98,8 @@
   f(final_update_refs_roots,                        "  Update Roots")                  \
   SHENANDOAH_GC_PAR_PHASE_DO(final_update_,         "    UR: ", f)                     \
   f(final_update_refs_sync_pinned,                  "  Sync Pinned")                   \
-  f(final_update_refs_trash_cset,                   "  Trash CSet")                    \
+  f(final_update_refs_trash_cset,                   "  Trash Collection Set")          \
+  f(final_update_refs_rebuild_freeset,              "  Rebuild Free Set")              \
                                                                                        \
   f(degen_gc_gross,                                 "Pause Degenerated GC (G)")        \
   f(degen_gc,                                       "Pause Degenerated GC (N)")        \