< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp

Print this page

 27 
 28 #include "jfr/jfrEvents.hpp"
 29 #include "gc/shenandoah/shenandoahNumberSeq.hpp"
 30 #include "gc/shared/workerDataArray.hpp"
 31 #include "memory/allocation.hpp"
 32 
 33 class ShenandoahCollectorPolicy;
 34 class outputStream;
 35 
 36 #define SHENANDOAH_PAR_PHASE_DO(CNT_PREFIX, DESC_PREFIX, f)                            \
 37   f(CNT_PREFIX ## TotalWork,                DESC_PREFIX "<total>")                     \
 38   f(CNT_PREFIX ## ThreadRoots,              DESC_PREFIX "Thread Roots")                \
 39   f(CNT_PREFIX ## CodeCacheRoots,           DESC_PREFIX "Code Cache Roots")            \
 40   f(CNT_PREFIX ## VMStrongRoots,            DESC_PREFIX "VM Strong Roots")             \
 41   f(CNT_PREFIX ## VMWeakRoots,              DESC_PREFIX "VM Weak Roots")               \
 42   f(CNT_PREFIX ## CLDGRoots,                DESC_PREFIX "CLDG Roots")                  \
 43   f(CNT_PREFIX ## CodeCacheUnload,          DESC_PREFIX "Unload Code Caches")          \
 44   f(CNT_PREFIX ## CLDUnlink,                DESC_PREFIX "Unlink CLDs")                 \
 45   f(CNT_PREFIX ## WeakRefProc,              DESC_PREFIX "Weak References")             \
 46   f(CNT_PREFIX ## ParallelMark,             DESC_PREFIX "Parallel Mark")               \

 47   // end
 48 
 49 #define SHENANDOAH_PHASE_DO(f)                                                         \
 50   f(conc_reset,                                     "Concurrent Reset")                \
 51                                                                                        \
 52   f(init_mark_gross,                                "Pause Init Mark (G)")             \
 53   f(init_mark,                                      "Pause Init Mark (N)")             \
 54   f(init_manage_tlabs,                              "  Manage TLABs")                  \
 55   f(init_update_region_states,                      "  Update Region States")          \
 56                                                                                        \



 57   f(conc_mark_roots,                                "Concurrent Mark Roots ")          \
 58   SHENANDOAH_PAR_PHASE_DO(conc_mark_roots,          "  CMR: ", f)                      \
 59   f(conc_mark,                                      "Concurrent Marking")              \
 60                                                                                        \
 61   f(final_mark_gross,                               "Pause Final Mark (G)")            \
 62   f(final_mark,                                     "Pause Final Mark (N)")            \
 63   f(finish_mark,                                    "  Finish Mark")                   \
 64   SHENANDOAH_PAR_PHASE_DO(finish_mark_,             "    FM: ", f)                     \


 65   f(purge,                                          "  System Purge")                  \
 66   SHENANDOAH_PAR_PHASE_DO(purge_cu_par_,            "      CU: ", f)                   \
 67   f(purge_weak_par,                                 "    Weak Roots")                  \
 68   SHENANDOAH_PAR_PHASE_DO(purge_weak_par_,          "      WR: ", f)                   \
 69   f(final_update_region_states,                     "  Update Region States")          \
 70   f(final_manage_labs,                              "  Manage GC/TLABs")               \
 71   f(choose_cset,                                    "  Choose Collection Set")         \
 72   f(final_rebuild_freeset,                          "  Rebuild Free Set")              \
 73   f(init_evac,                                      "  Initial Evacuation")            \
 74   SHENANDOAH_PAR_PHASE_DO(evac_,                    "    E: ", f)                      \
 75                                                                                        \
 76   f(conc_thread_roots,                              "Concurrent Thread Roots")         \
 77   SHENANDOAH_PAR_PHASE_DO(conc_thread_roots_,       "  CTR: ", f)                      \
 78   f(conc_weak_refs,                                 "Concurrent Weak References")      \
 79   SHENANDOAH_PAR_PHASE_DO(conc_weak_refs_,          "  CWRF: ", f)                     \
 80   f(conc_weak_roots,                                "Concurrent Weak Roots")           \
 81   f(conc_weak_roots_work,                           "  Roots")                         \
 82   SHENANDOAH_PAR_PHASE_DO(conc_weak_roots_work_,    "    CWR: ", f)                    \
 83   f(conc_weak_roots_rendezvous,                     "  Rendezvous")                    \
 84   f(conc_cleanup_early,                             "Concurrent Cleanup")              \

154   SHENANDOAH_PAR_PHASE_DO(full_gc_mark_,            "    FM: ", f)                     \
155   f(full_gc_purge,                                  "    System Purge")                \
156   f(full_gc_weakrefs,                               "      Weak References")           \
157   SHENANDOAH_PAR_PHASE_DO(full_gc_weakrefs_p_,      "        WRP: ", f)                \
158   f(full_gc_purge_class_unload,                     "      Unload Classes")            \
159   SHENANDOAH_PAR_PHASE_DO(full_gc_purge_cu_par_,    "        CU: ", f)                 \
160   f(full_gc_purge_weak_par,                         "      Weak Roots")                \
161   SHENANDOAH_PAR_PHASE_DO(full_gc_purge_weak_p_,    "        WR: ", f)                 \
162   f(full_gc_purge_cldg,                             "      CLDG")                      \
163   f(full_gc_calculate_addresses,                    "  Calculate Addresses")           \
164   f(full_gc_calculate_addresses_regular,            "    Regular Objects")             \
165   f(full_gc_calculate_addresses_humong,             "    Humongous Objects")           \
166   f(full_gc_adjust_pointers,                        "  Adjust Pointers")               \
167   f(full_gc_adjust_roots,                           "  Adjust Roots")                  \
168   SHENANDOAH_PAR_PHASE_DO(full_gc_adjust_roots_,    "    FA: ", f)                     \
169   f(full_gc_copy_objects,                           "  Copy Objects")                  \
170   f(full_gc_copy_objects_regular,                   "    Regular Objects")             \
171   f(full_gc_copy_objects_humong,                    "    Humongous Objects")           \
172   f(full_gc_copy_objects_reset_complete,            "    Reset Complete Bitmap")       \
173   f(full_gc_copy_objects_rebuild,                   "    Rebuild Region Sets")         \

174   f(full_gc_heapdump_post,                          "  Post Heap Dump")                \
175                                                                                        \
176   f(conc_uncommit,                                  "Concurrent Uncommit")             \
177   f(pacing,                                         "Pacing")                          \
178                                                                                        \
179   f(heap_iteration_roots,                           "Heap Iteration")                  \
180   SHENANDOAH_PAR_PHASE_DO(heap_iteration_roots_,    "  HI: ", f)                       \
181   // end
182 
183 typedef WorkerDataArray<double> ShenandoahWorkerData;
184 
185 class ShenandoahPhaseTimings : public CHeapObj<mtGC> {
186   friend class ShenandoahGCPhase;
187   friend class ShenandoahWorkerTimingsTracker;
188 public:
189 #define SHENANDOAH_PHASE_DECLARE_ENUM(type, title)   type,
190 
191   enum Phase {
192     SHENANDOAH_PHASE_DO(SHENANDOAH_PHASE_DECLARE_ENUM)
193     _num_phases,

 27 
 28 #include "jfr/jfrEvents.hpp"
 29 #include "gc/shenandoah/shenandoahNumberSeq.hpp"
 30 #include "gc/shared/workerDataArray.hpp"
 31 #include "memory/allocation.hpp"
 32 
 33 class ShenandoahCollectorPolicy;
 34 class outputStream;
 35 
 36 #define SHENANDOAH_PAR_PHASE_DO(CNT_PREFIX, DESC_PREFIX, f)                            \
 37   f(CNT_PREFIX ## TotalWork,                DESC_PREFIX "<total>")                     \
 38   f(CNT_PREFIX ## ThreadRoots,              DESC_PREFIX "Thread Roots")                \
 39   f(CNT_PREFIX ## CodeCacheRoots,           DESC_PREFIX "Code Cache Roots")            \
 40   f(CNT_PREFIX ## VMStrongRoots,            DESC_PREFIX "VM Strong Roots")             \
 41   f(CNT_PREFIX ## VMWeakRoots,              DESC_PREFIX "VM Weak Roots")               \
 42   f(CNT_PREFIX ## CLDGRoots,                DESC_PREFIX "CLDG Roots")                  \
 43   f(CNT_PREFIX ## CodeCacheUnload,          DESC_PREFIX "Unload Code Caches")          \
 44   f(CNT_PREFIX ## CLDUnlink,                DESC_PREFIX "Unlink CLDs")                 \
 45   f(CNT_PREFIX ## WeakRefProc,              DESC_PREFIX "Weak References")             \
 46   f(CNT_PREFIX ## ParallelMark,             DESC_PREFIX "Parallel Mark")               \
 47   f(CNT_PREFIX ## ScanClusters,             DESC_PREFIX "Scan Clusters")
 48   // end
 49 
 50 #define SHENANDOAH_PHASE_DO(f)                                                         \
 51   f(conc_reset,                                     "Concurrent Reset")                \
 52                                                                                        \
 53   f(init_mark_gross,                                "Pause Init Mark (G)")             \
 54   f(init_mark,                                      "Pause Init Mark (N)")             \
 55   f(init_manage_tlabs,                              "  Manage TLABs")                  \
 56   f(init_update_region_states,                      "  Update Region States")          \
 57                                                                                        \
 58   f(init_scan_rset,                                 "Concurrent Scan Remembered Set")  \
 59   SHENANDOAH_PAR_PHASE_DO(init_scan_rset_,          "  RS: ", f)                       \
 60                                                                                        \
 61   f(conc_mark_roots,                                "Concurrent Mark Roots ")          \
 62   SHENANDOAH_PAR_PHASE_DO(conc_mark_roots,          "  CMR: ", f)                      \
 63   f(conc_mark,                                      "Concurrent Marking")              \
 64                                                                                        \
 65   f(final_mark_gross,                               "Pause Final Mark (G)")            \
 66   f(final_mark,                                     "Pause Final Mark (N)")            \
 67   f(finish_mark,                                    "  Finish Mark")                   \
 68   SHENANDOAH_PAR_PHASE_DO(finish_mark_,             "    FM: ", f)                     \
 69   f(coalesce_and_fill,                              "Coalesce and Fill Old Dead")      \
 70   SHENANDOAH_PAR_PHASE_DO(coalesce_and_fill_,       "    CFOD: ", f)                   \
 71   f(purge,                                          "  System Purge")                  \
 72   SHENANDOAH_PAR_PHASE_DO(purge_cu_par_,            "      CU: ", f)                   \
 73   f(purge_weak_par,                                 "    Weak Roots")                  \
 74   SHENANDOAH_PAR_PHASE_DO(purge_weak_par_,          "      WR: ", f)                   \
 75   f(final_update_region_states,                     "  Update Region States")          \
 76   f(final_manage_labs,                              "  Manage GC/TLABs")               \
 77   f(choose_cset,                                    "  Choose Collection Set")         \
 78   f(final_rebuild_freeset,                          "  Rebuild Free Set")              \
 79   f(init_evac,                                      "  Initial Evacuation")            \
 80   SHENANDOAH_PAR_PHASE_DO(evac_,                    "    E: ", f)                      \
 81                                                                                        \
 82   f(conc_thread_roots,                              "Concurrent Thread Roots")         \
 83   SHENANDOAH_PAR_PHASE_DO(conc_thread_roots_,       "  CTR: ", f)                      \
 84   f(conc_weak_refs,                                 "Concurrent Weak References")      \
 85   SHENANDOAH_PAR_PHASE_DO(conc_weak_refs_,          "  CWRF: ", f)                     \
 86   f(conc_weak_roots,                                "Concurrent Weak Roots")           \
 87   f(conc_weak_roots_work,                           "  Roots")                         \
 88   SHENANDOAH_PAR_PHASE_DO(conc_weak_roots_work_,    "    CWR: ", f)                    \
 89   f(conc_weak_roots_rendezvous,                     "  Rendezvous")                    \
 90   f(conc_cleanup_early,                             "Concurrent Cleanup")              \

160   SHENANDOAH_PAR_PHASE_DO(full_gc_mark_,            "    FM: ", f)                     \
161   f(full_gc_purge,                                  "    System Purge")                \
162   f(full_gc_weakrefs,                               "      Weak References")           \
163   SHENANDOAH_PAR_PHASE_DO(full_gc_weakrefs_p_,      "        WRP: ", f)                \
164   f(full_gc_purge_class_unload,                     "      Unload Classes")            \
165   SHENANDOAH_PAR_PHASE_DO(full_gc_purge_cu_par_,    "        CU: ", f)                 \
166   f(full_gc_purge_weak_par,                         "      Weak Roots")                \
167   SHENANDOAH_PAR_PHASE_DO(full_gc_purge_weak_p_,    "        WR: ", f)                 \
168   f(full_gc_purge_cldg,                             "      CLDG")                      \
169   f(full_gc_calculate_addresses,                    "  Calculate Addresses")           \
170   f(full_gc_calculate_addresses_regular,            "    Regular Objects")             \
171   f(full_gc_calculate_addresses_humong,             "    Humongous Objects")           \
172   f(full_gc_adjust_pointers,                        "  Adjust Pointers")               \
173   f(full_gc_adjust_roots,                           "  Adjust Roots")                  \
174   SHENANDOAH_PAR_PHASE_DO(full_gc_adjust_roots_,    "    FA: ", f)                     \
175   f(full_gc_copy_objects,                           "  Copy Objects")                  \
176   f(full_gc_copy_objects_regular,                   "    Regular Objects")             \
177   f(full_gc_copy_objects_humong,                    "    Humongous Objects")           \
178   f(full_gc_copy_objects_reset_complete,            "    Reset Complete Bitmap")       \
179   f(full_gc_copy_objects_rebuild,                   "    Rebuild Region Sets")         \
180   f(full_gc_reconstruct_remembered_set,             "    Reconstruct Remembered Set")  \
181   f(full_gc_heapdump_post,                          "  Post Heap Dump")                \
182                                                                                        \
183   f(conc_uncommit,                                  "Concurrent Uncommit")             \
184   f(pacing,                                         "Pacing")                          \
185                                                                                        \
186   f(heap_iteration_roots,                           "Heap Iteration")                  \
187   SHENANDOAH_PAR_PHASE_DO(heap_iteration_roots_,    "  HI: ", f)                       \
188   // end
189 
190 typedef WorkerDataArray<double> ShenandoahWorkerData;
191 
192 class ShenandoahPhaseTimings : public CHeapObj<mtGC> {
193   friend class ShenandoahGCPhase;
194   friend class ShenandoahWorkerTimingsTracker;
195 public:
196 #define SHENANDOAH_PHASE_DECLARE_ENUM(type, title)   type,
197 
198   enum Phase {
199     SHENANDOAH_PHASE_DO(SHENANDOAH_PHASE_DECLARE_ENUM)
200     _num_phases,
< prev index next >