1 
   2 /*
   3  * Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_SHENANDOAH_SHENANDOAHPHASETIMEINGS_HPP
  26 #define SHARE_VM_GC_SHENANDOAH_SHENANDOAHPHASETIMEINGS_HPP
  27 
  28 #include "gc/shenandoah/shenandoahNumberSeq.hpp"
  29 #include "gc/shared/workerDataArray.hpp"
  30 #include "memory/allocation.hpp"
  31 
  32 class ShenandoahCollectorPolicy;
  33 class ShenandoahWorkerTimings;
  34 class ShenandoahTerminationTimings;
  35 class outputStream;
  36 
  37 #define SHENANDOAH_GC_PHASE_DO(f)                                                       \
  38   f(total_pause_gross,                              "Total Pauses (G)")                 \
  39   f(total_pause,                                    "Total Pauses (N)")                 \
  40   f(init_mark_gross,                                "Pause Init Mark (G)")              \
  41   f(init_mark,                                      "Pause Init Mark (N)")              \
  42   f(accumulate_stats,                               "  Accumulate Stats")               \
  43   f(make_parsable,                                  "  Make Parsable")                  \
  44   f(clear_liveness,                                 "  Clear Liveness")                 \
  45                                                                                         \
  46   /* Per-thread timer block, should have "roots" counters in consistent order */        \
  47   f(scan_roots,                                     "  Scan Roots")                     \
  48   f(scan_thread_roots,                              "    S: Thread Roots")              \
  49   f(scan_code_roots,                                "    S: Code Cache Roots")          \
  50   f(scan_string_table_roots,                        "    S: String Table Roots")        \
  51   f(scan_universe_roots,                            "    S: Universe Roots")            \
  52   f(scan_jni_roots,                                 "    S: JNI Roots")                 \
  53   f(scan_jni_weak_roots,                            "    S: JNI Weak Roots")            \
  54   f(scan_synchronizer_roots,                        "    S: Synchronizer Roots")        \
  55   f(scan_management_roots,                          "    S: Management Roots")          \
  56   f(scan_system_dictionary_roots,                   "    S: System Dict Roots")         \
  57   f(scan_cldg_roots,                                "    S: CLDG Roots")                \
  58   f(scan_jvmti_roots,                               "    S: JVMTI Roots")               \
  59   f(scan_string_dedup_table_roots,                  "    S: Dedup Table Roots")         \
  60   f(scan_string_dedup_queue_roots,                  "    S: Dedup Queue Roots")         \
  61   f(scan_finish_queues,                             "    S: Finish Queues" )            \
  62                                                                                         \
  63   f(resize_tlabs,                                   "  Resize TLABs")                   \
  64                                                                                         \
  65   f(final_mark_gross,                               "Pause Final Mark (G)")             \
  66   f(final_mark,                                     "Pause Final Mark (N)")             \
  67                                                                                         \
  68   /* Per-thread timer block, should have "roots" counters in consistent order */        \
  69   f(update_roots,                                   "  Update Roots")                   \
  70   f(update_thread_roots,                            "    U: Thread Roots")              \
  71   f(update_code_roots,                              "    U: Code Cache Roots")          \
  72   f(update_string_table_roots,                      "    U: String Table Roots")        \
  73   f(update_universe_roots,                          "    U: Universe Roots")            \
  74   f(update_jni_roots,                               "    U: JNI Roots")                 \
  75   f(update_jni_weak_roots,                          "    U: JNI Weak Roots")            \
  76   f(update_synchronizer_roots,                      "    U: Synchronizer Roots")        \
  77   f(update_management_roots,                        "    U: Management Roots")          \
  78   f(update_system_dictionary_roots,                 "    U: System Dict Roots")         \
  79   f(update_cldg_roots,                              "    U: CLDG Roots")                \
  80   f(update_jvmti_roots,                             "    U: JVMTI Roots")               \
  81   f(update_string_dedup_table_roots,                "    U: Dedup Table Roots")         \
  82   f(update_string_dedup_queue_roots,                "    U: Dedup Queue Roots")         \
  83   f(update_finish_queues,                           "    U: Finish Queues")             \
  84                                                                                         \
  85   f(finish_queues,                                  "  Finish Queues")                  \
  86   f(termination,                                    "    Termination")                  \
  87   f(weakrefs,                                       "  Weak References")                \
  88   f(weakrefs_process,                               "    Process")                      \
  89   f(weakrefs_termination,                           "      Termination")                \
  90   f(purge,                                          "  System Purge")                   \
  91   f(purge_class_unload,                             "    Unload Classes")               \
  92   f(purge_par,                                      "    Parallel Cleanup")             \
  93   f(purge_cldg,                                     "    CLDG")                         \
  94   f(purge_string_dedup,                             "    String Dedup")                 \
  95   f(complete_liveness,                              "  Complete Liveness")              \
  96   f(prepare_evac,                                   "  Prepare Evacuation")             \
  97   f(recycle_regions,                                "  Recycle regions")                \
  98                                                                                         \
  99   /* Per-thread timer block, should have "roots" counters in consistent order */        \
 100   f(init_evac,                                      "  Initial Evacuation")             \
 101   f(evac_thread_roots,                              "    E: Thread Roots")              \
 102   f(evac_code_roots,                                "    E: Code Cache Roots")          \
 103   f(evac_string_table_roots,                        "    E: String Table Roots")        \
 104   f(evac_universe_roots,                            "    E: Universe Roots")            \
 105   f(evac_jni_roots,                                 "    E: JNI Roots")                 \
 106   f(evac_jni_weak_roots,                            "    E: JNI Weak Roots")            \
 107   f(evac_synchronizer_roots,                        "    E: Synchronizer Roots")        \
 108   f(evac_management_roots,                          "    E: Management Roots")          \
 109   f(evac_system_dictionary_roots,                   "    E: System Dict Roots")         \
 110   f(evac_cldg_roots,                                "    E: CLDG Roots")                \
 111   f(evac_jvmti_roots,                               "    E: JVMTI Roots")               \
 112   f(evac_string_dedup_table_roots,                  "    E: String Dedup Table Roots")  \
 113   f(evac_string_dedup_queue_roots,                  "    E: String Dedup Queue Roots")  \
 114   f(evac_finish_queues,                             "    E: Finish Queues")             \
 115                                                                                         \
 116   f(final_evac_gross,                               "Pause Final Evac (G)")             \
 117   f(final_evac,                                     "Pause Final Evac (N)")             \
 118                                                                                         \
 119   f(init_update_refs_gross,                         "Pause Init  Update Refs (G)")      \
 120   f(init_update_refs,                               "Pause Init  Update Refs (N)")      \
 121                                                                                         \
 122   f(final_update_refs_gross,                         "Pause Final Update Refs (G)")     \
 123   f(final_update_refs,                               "Pause Final Update Refs (N)")     \
 124   f(final_update_refs_finish_work,                   "  Finish Work")                   \
 125                                                                                         \
 126   /* Per-thread timer block, should have "roots" counters in consistent order */        \
 127   f(final_update_refs_roots,                         "  Update Roots")                  \
 128   f(final_update_refs_thread_roots,                  "    UR: Thread Roots")            \
 129   f(final_update_refs_code_roots,                    "    UR: Code Cache Roots")        \
 130   f(final_update_refs_string_table_roots,            "    UR: String Table Roots")      \
 131   f(final_update_refs_universe_roots,                "    UR: Universe Roots")          \
 132   f(final_update_refs_jni_roots,                     "    UR: JNI Roots")               \
 133   f(final_update_refs_jni_weak_roots,                "    UR: JNI Weak Roots")          \
 134   f(final_update_refs_synchronizer_roots,            "    UR: Synchronizer Roots")      \
 135   f(final_update_refs_management_roots,              "    UR: Management Roots")        \
 136   f(final_update_refs_system_dict_roots,             "    UR: System Dict Roots")       \
 137   f(final_update_refs_cldg_roots,                    "    UR: CLDG Roots")              \
 138   f(final_update_refs_jvmti_roots,                   "    UR: JVMTI Roots")             \
 139   f(final_update_refs_string_dedup_table_roots,      "    UR: Dedup Table Roots")       \
 140   f(final_update_refs_string_dedup_queue_roots,      "    UR: Dedup Queue Roots")       \
 141   f(final_update_refs_finish_queues,                 "    UR: Finish Queues")           \
 142                                                                                         \
 143   f(final_update_refs_recycle,                       "  Recycle")                       \
 144                                                                                         \
 145   f(degen_gc_gross,                                  "Pause Degenerated GC (G)")        \
 146   f(degen_gc,                                        "Pause Degenerated GC (N)")        \
 147                                                                                         \
 148   /* Per-thread timer block, should have "roots" counters in consistent order */        \
 149   f(degen_gc_update_roots,                           "  Degen Update Roots")            \
 150   f(degen_gc_update_thread_roots,                    "    DU: Thread Roots")            \
 151   f(degen_gc_update_code_roots,                      "    DU: Code Cache Roots")        \
 152   f(degen_gc_update_string_table_roots,              "    DU: String Table Roots")      \
 153   f(degen_gc_update_universe_roots,                  "    DU: Universe Roots")          \
 154   f(degen_gc_update_jni_roots,                       "    DU: JNI Roots")               \
 155   f(degen_gc_update_jni_weak_roots,                  "    DU: JNI Weak Roots")          \
 156   f(degen_gc_update_synchronizer_roots,              "    DU: Synchronizer Roots")      \
 157   f(degen_gc_update_management_roots,                "    DU: Management Roots")        \
 158   f(degen_gc_update_system_dict_roots,               "    DU: System Dict Roots")       \
 159   f(degen_gc_update_cldg_roots,                      "    DU: CLDG Roots")              \
 160   f(degen_gc_update_jvmti_roots,                     "    DU: JVMTI Roots")             \
 161   f(degen_gc_update_string_dedup_table_roots,        "    DU: Dedup Table Roots")       \
 162   f(degen_gc_update_string_dedup_queue_roots,        "    DU: Dedup Queue Roots")       \
 163   f(degen_gc_update_finish_queues,                   "    DU: Finish Queues")           \
 164                                                                                         \
 165   f(init_traversal_gc_gross,                         "Pause Init Traversal (G)")        \
 166   f(init_traversal_gc,                               "Pause Init Traversal (N)")        \
 167   f(traversal_gc_prepare,                            "  Prepare")                       \
 168   f(traversal_gc_accumulate_stats,                   "    Accumulate Stats")            \
 169   f(traversal_gc_make_parsable,                      "    Make Parsable")               \
 170   f(traversal_gc_resize_tlabs,                       "    Resize TLABs")                \
 171                                                                                         \
 172   /* Per-thread timer block, should have "roots" counters in consistent order */        \
 173   f(init_traversal_gc_work,                          "  Work")                          \
 174   f(init_traversal_gc_thread_roots,                  "    TI: Thread Roots")            \
 175   f(init_traversal_gc_code_roots,                    "    TI: Code Cache Roots")        \
 176   f(init_traversal_gc_string_table_roots,            "    TI: String Table Roots")      \
 177   f(init_traversal_gc_universe_roots,                "    TI: Universe Roots")          \
 178   f(init_traversal_gc_jni_roots,                     "    TI: JNI Roots")               \
 179   f(init_traversal_gc_jni_weak_roots,                "    TI: JNI Weak Roots")          \
 180   f(init_traversal_gc_synchronizer_roots,            "    TI: Synchronizer Roots")      \
 181   f(init_traversal_gc_management_roots,              "    TI: Management Roots")        \
 182   f(init_traversal_gc_system_dict_roots,             "    TI: System Dict Roots")       \
 183   f(init_traversal_gc_cldg_roots,                    "    TI: CLDG Roots")              \
 184   f(init_traversal_gc_jvmti_roots,                   "    TI: JVMTI Roots")             \
 185   f(init_traversal_gc_string_dedup_table_roots,      "    TI: Dedup Table Roots")       \
 186   f(init_traversal_gc_string_dedup_queue_roots,      "    TI: Dedup Queue Roots")       \
 187   f(init_traversal_gc_finish_queues,                 "    TI: Finish Queues")           \
 188                                                                                         \
 189   f(final_traversal_gc_gross,                        "Pause Final Traversal (G)")       \
 190   f(final_traversal_gc,                              "Pause Final Traversal (N)")       \
 191                                                                                         \
 192   /* Per-thread timer block, should have "roots" counters in consistent order */        \
 193   f(final_traversal_gc_work,                         "  Work")                          \
 194   f(final_traversal_gc_thread_roots,                 "    TF: Thread Roots")            \
 195   f(final_traversal_gc_code_roots,                   "    TF: Code Cache Roots")        \
 196   f(final_traversal_gc_string_table_roots,           "    TF: String Table Roots")      \
 197   f(final_traversal_gc_universe_roots,               "    TF: Universe Roots")          \
 198   f(final_traversal_gc_jni_roots,                    "    TF: JNI Roots")               \
 199   f(final_traversal_gc_jni_weak_roots,               "    TF: JNI Weak Roots")          \
 200   f(final_traversal_gc_synchronizer_roots,           "    TF: Synchronizer Roots")      \
 201   f(final_traversal_gc_management_roots,             "    TF: Management Roots")        \
 202   f(final_traversal_gc_system_dict_roots,            "    TF: System Dict Roots")       \
 203   f(final_traversal_gc_cldg_roots,                   "    TF: CLDG Roots")              \
 204   f(final_traversal_gc_jvmti_roots,                  "    TF: JVMTI Roots")             \
 205   f(final_traversal_gc_string_dedup_table_roots,     "    TF: Dedup Table Roots")       \
 206   f(final_traversal_gc_string_dedup_queue_roots,     "    TF: Dedup Queue Roots")       \
 207   f(final_traversal_gc_finish_queues,                "    TF: Finish Queues")           \
 208   f(final_traversal_gc_termination,                  "    TF:   Termination")           \
 209                                                                                         \
 210   /* Per-thread timer block, should have "roots" counters in consistent order */        \
 211   f(final_traversal_update_roots,                    "  Update Roots")                  \
 212   f(final_traversal_update_thread_roots,             "    TU: Thread Roots")            \
 213   f(final_traversal_update_code_roots,               "    TU: Code Cache Roots")        \
 214   f(final_traversal_update_string_table_roots,       "    TU: String Table Roots")      \
 215   f(final_traversal_update_universe_roots,           "    TU: Universe Roots")          \
 216   f(final_traversal_update_jni_roots,                "    TU: JNI Roots")               \
 217   f(final_traversal_update_jni_weak_roots,           "    TU: JNI Weak Roots")          \
 218   f(final_traversal_update_synchronizer_roots,       "    TU: Synchronizer Roots")      \
 219   f(final_traversal_update_management_roots,         "    TU: Management Roots")        \
 220   f(final_traversal_update_system_dict_roots,        "    TU: System Dict Roots")       \
 221   f(final_traversal_update_cldg_roots,               "    TU: CLDG Roots")              \
 222   f(final_traversal_update_jvmti_roots,              "    TU: JVMTI Roots")             \
 223   f(final_traversal_update_string_dedup_table_roots, "    TU: Dedup Table Roots")       \
 224   f(final_traversal_update_string_dedup_queue_roots, "    TU: Dedup Queue Roots")       \
 225   f(final_traversal_update_finish_queues,            "    TU: Finish Queues")           \
 226                                                                                         \
 227   f(traversal_gc_cleanup,                            "  Cleanup")                       \
 228                                                                                         \
 229   f(full_gc_gross,                                   "Pause Full GC (G)")               \
 230   f(full_gc,                                         "Pause Full GC (N)")               \
 231   f(full_gc_heapdumps,                               "  Heap Dumps")                    \
 232   f(full_gc_prepare,                                 "  Prepare")                       \
 233                                                                                         \
 234   /* Per-thread timer block, should have "roots" counters in consistent order */        \
 235   f(full_gc_roots,                                   "  Roots")                         \
 236   f(full_gc_thread_roots,                            "    F: Thread Roots")             \
 237   f(full_gc_code_roots,                              "    F: Code Cache Roots")         \
 238   f(full_gc_string_table_roots,                      "    F: String Table Roots")       \
 239   f(full_gc_universe_roots,                          "    F: Universe Roots")           \
 240   f(full_gc_jni_roots,                               "    F: JNI Roots")                \
 241   f(full_gc_jni_weak_roots,                          "    F: JNI Weak Roots")           \
 242   f(full_gc_synchronizer_roots,                      "    F: Synchronizer Roots")       \
 243   f(full_gc_management_roots,                        "    F: Management Roots")         \
 244   f(full_gc_system_dictionary_roots,                 "    F: System Dict Roots")        \
 245   f(full_gc_cldg_roots,                              "    F: CLDG Roots")               \
 246   f(full_gc_jvmti_roots,                             "    F: JVMTI Roots")              \
 247   f(full_gc_string_dedup_table_roots,                "    F: Dedup Table Roots")        \
 248   f(full_gc_string_dedup_queue_roots,                "    F: Dedup Queue Roots")        \
 249   f(full_gc_finish_queues,                           "    F: Finish Queues")            \
 250                                                                                         \
 251   f(full_gc_mark,                                    "  Mark")                          \
 252   f(full_gc_mark_finish_queues,                      "    Finish Queues")               \
 253   f(full_gc_mark_termination,                        "      Termination")               \
 254   f(full_gc_weakrefs,                                "    Weak References")             \
 255   f(full_gc_weakrefs_process,                        "      Process")                   \
 256   f(full_gc_weakrefs_termination,                    "        Termination")             \
 257   f(full_gc_purge,                                   "    System Purge")                \
 258   f(full_gc_purge_class_unload,                      "      Unload Classes")            \
 259   f(full_gc_purge_par,                               "    Parallel Cleanup")            \
 260   f(full_gc_purge_cldg,                              "    CLDG")                        \
 261   f(full_gc_purge_string_dedup,                      "    String Dedup")                \
 262   f(full_gc_calculate_addresses,                     "  Calculate Addresses")           \
 263   f(full_gc_calculate_addresses_regular,             "    Regular Objects")             \
 264   f(full_gc_calculate_addresses_humong,              "    Humongous Objects")           \
 265   f(full_gc_adjust_pointers,                         "  Adjust Pointers")               \
 266   f(full_gc_copy_objects,                            "  Copy Objects")                  \
 267   f(full_gc_copy_objects_regular,                    "    Regular Objects")             \
 268   f(full_gc_copy_objects_humong,                     "    Humongous Objects")           \
 269   f(full_gc_copy_objects_reset_complete,             "    Reset Complete Bitmap")       \
 270   f(full_gc_copy_objects_rebuild,                    "    Rebuild Region Sets")         \
 271   f(full_gc_resize_tlabs,                            "  Resize TLABs")                  \
 272                                                                                         \
 273   /* Longer concurrent phases at the end */                                             \
 274   f(conc_reset,                                      "Concurrent Reset")                \
 275   f(conc_mark,                                       "Concurrent Marking")              \
 276   f(conc_termination,                                "  Termination")                   \
 277   f(conc_preclean,                                   "Concurrent Precleaning")          \
 278   f(conc_evac,                                       "Concurrent Evacuation")           \
 279   f(conc_update_refs,                                "Concurrent Update Refs")          \
 280   f(conc_cleanup,                                    "Concurrent Cleanup")              \
 281   f(conc_traversal,                                  "Concurrent Traversal")            \
 282   f(conc_traversal_termination,                      "  Termination")                   \
 283                                                                                         \
 284   f(conc_uncommit,                                   "Concurrent Uncommit")             \
 285                                                                                         \
 286   /* Unclassified */                                                                    \
 287   f(pause_other,                                     "Pause Other")                     \
 288   f(conc_other,                                      "Concurrent Other")                \
 289   // end
 290 
 291 #define SHENANDOAH_GC_PAR_PHASE_DO(f)                           \
 292   f(ThreadRoots,             "Thread Roots (ms):")              \
 293   f(CodeCacheRoots,          "CodeCache Roots (ms):")           \
 294   f(StringTableRoots,        "StringTable Roots (ms):")         \
 295   f(UniverseRoots,           "Universe Roots (ms):")            \
 296   f(JNIRoots,                "JNI Handles Roots (ms):")         \
 297   f(JNIWeakRoots,            "JNI Weak Roots (ms):")            \
 298   f(ObjectSynchronizerRoots, "ObjectSynchronizer Roots (ms):")  \
 299   f(ManagementRoots,         "Management Roots (ms):")          \
 300   f(SystemDictionaryRoots,   "SystemDictionary Roots (ms):")    \
 301   f(CLDGRoots,               "CLDG Roots (ms):")                \
 302   f(JVMTIRoots,              "JVMTI Roots (ms):")               \
 303   f(StringDedupTableRoots,   "String Dedup Table Roots (ms):")  \
 304   f(StringDedupQueueRoots,   "String Dedup Queue Roots (ms):")  \
 305   f(FinishQueues,            "Finish Queues (ms):")             \
 306   // end
 307 
 308 class ShenandoahPhaseTimings : public CHeapObj<mtGC> {
 309 public:
 310 #define GC_PHASE_DECLARE_ENUM(type, title)   type,
 311 
 312   enum Phase {
 313     SHENANDOAH_GC_PHASE_DO(GC_PHASE_DECLARE_ENUM)
 314     _num_phases
 315   };
 316 
 317   // These are the subphases of GC phases (scan_roots, update_roots,
 318   // init_evac, final_update_refs_roots and full_gc_roots).
 319   // Make sure they are following this order.
 320   enum GCParPhases {
 321     SHENANDOAH_GC_PAR_PHASE_DO(GC_PHASE_DECLARE_ENUM)
 322     GCParPhasesSentinel
 323   };
 324 
 325 #undef GC_PHASE_DECLARE_ENUM
 326 
 327 private:
 328   struct TimingData {
 329     HdrSeq _secs;
 330     double _start;
 331   };
 332 
 333 private:
 334   TimingData          _timing_data[_num_phases];
 335   static const char*  _phase_names[_num_phases];
 336 
 337   ShenandoahWorkerTimings*      _worker_times;
 338   ShenandoahTerminationTimings* _termination_times;
 339 
 340   ShenandoahCollectorPolicy* _policy;
 341 
 342 public:
 343   ShenandoahPhaseTimings();
 344 
 345   ShenandoahWorkerTimings* const worker_times() const { return _worker_times; }
 346   ShenandoahTerminationTimings* const termination_times() const { return _termination_times; }
 347 
 348   // record phase start
 349   void record_phase_start(Phase phase);
 350   // record phase end and return elapsed time in seconds for the phase
 351   void record_phase_end(Phase phase);
 352   // record an elapsed time for the phase
 353   void record_phase_time(Phase phase, double time);
 354 
 355   void record_workers_start(Phase phase);
 356   void record_workers_end(Phase phase);
 357 
 358   static const char* phase_name(Phase phase) {
 359     assert(phase >= 0 && phase < _num_phases, "Out of bound");
 360     return _phase_names[phase];
 361   }
 362 
 363   void print_on(outputStream* out) const;
 364 
 365 private:
 366   void init_phase_names();
 367   void print_summary_sd(outputStream* out, const char* str, const HdrSeq* seq) const;
 368 };
 369 
 370 class ShenandoahWorkerTimings : public CHeapObj<mtGC> {
 371 private:
 372   uint _max_gc_threads;
 373   WorkerDataArray<double>* _gc_par_phases[ShenandoahPhaseTimings::GCParPhasesSentinel];
 374 
 375 public:
 376   ShenandoahWorkerTimings(uint max_gc_threads);
 377 
 378   // record the time a phase took in seconds
 379   void record_time_secs(ShenandoahPhaseTimings::GCParPhases phase, uint worker_i, double secs);
 380 
 381   double average(uint i) const;
 382   void reset(uint i);
 383   void print() const;
 384 };
 385 
 386 class ShenandoahTerminationTimings : public CHeapObj<mtGC> {
 387 private:
 388   WorkerDataArray<double>* _gc_termination_phase;
 389 public:
 390   ShenandoahTerminationTimings(uint max_gc_threads);
 391 
 392   // record the time a phase took in seconds
 393   void record_time_secs(uint worker_i, double secs);
 394 
 395   double average() const;
 396   void reset();
 397 
 398   void print() const;
 399 };
 400 
 401 #endif // SHARE_VM_GC_SHENANDOAH_SHENANDOAHGCPHASETIMEINGS_HPP