8230024: Shenandoah: remove unnecessary ShenandoahTimingConverter
authorshade
Thu, 22 Aug 2019 13:47:13 +0200
changeset 57836 e70dec4229e9
parent 57835 c2bc7b07c67a
child 57837 2227a0cfd6b3
8230024: Shenandoah: remove unnecessary ShenandoahTimingConverter Reviewed-by: rkennke, zgu
src/hotspot/share/gc/shenandoah/shenandoahUtils.cpp
src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahUtils.cpp	Thu Aug 22 12:46:20 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahUtils.cpp	Thu Aug 22 13:47:13 2019 +0200
@@ -184,47 +184,3 @@
   ShenandoahThreadLocalData::set_worker_id(thr, ShenandoahThreadLocalData::INVALID_WORKER_ID);
 #endif
 }
-
-struct PhaseMap {
-   WeakProcessorPhases::Phase            _weak_processor_phase;
-   ShenandoahPhaseTimings::GCParPhases   _shenandoah_phase;
-};
-
-static const struct PhaseMap phase_mapping[] = {
-#if INCLUDE_JVMTI
-  {WeakProcessorPhases::jvmti,                 ShenandoahPhaseTimings::JVMTIWeakRoots},
-#endif
-#if INCLUDE_JFR
-  {WeakProcessorPhases::jfr,                   ShenandoahPhaseTimings::JFRWeakRoots},
-#endif
-  {WeakProcessorPhases::jni,                   ShenandoahPhaseTimings::JNIWeakRoots},
-  {WeakProcessorPhases::stringtable,           ShenandoahPhaseTimings::StringTableRoots},
-  {WeakProcessorPhases::resolved_method_table, ShenandoahPhaseTimings::ResolvedMethodTableRoots},
-  {WeakProcessorPhases::vm,                    ShenandoahPhaseTimings::VMWeakRoots}
-};
-
-STATIC_ASSERT(sizeof(phase_mapping) / sizeof(PhaseMap) == WeakProcessorPhases::phase_count);
-
-void ShenandoahTimingConverter::weak_processing_timing_to_shenandoah_timing(WeakProcessorPhaseTimes* weak_processing_timings,
-                                                                            ShenandoahWorkerTimings* sh_worker_times) {
-  assert(weak_processing_timings->max_threads() == weak_processing_timings->max_threads(), "Must match");
-  for (uint index = 0; index < WeakProcessorPhases::phase_count; index ++) {
-    weak_processing_phase_to_shenandoah_phase(phase_mapping[index]._weak_processor_phase,
-                                              weak_processing_timings,
-                                              phase_mapping[index]._shenandoah_phase,
-                                              sh_worker_times);
-  }
-}
-
-void ShenandoahTimingConverter::weak_processing_phase_to_shenandoah_phase(WeakProcessorPhases::Phase wpp,
-                                                                          WeakProcessorPhaseTimes* weak_processing_timings,
-                                                                          ShenandoahPhaseTimings::GCParPhases spp,
-                                                                          ShenandoahWorkerTimings* sh_worker_times) {
-  if (WeakProcessorPhases::is_serial(wpp)) {
-    sh_worker_times->record_time_secs(spp, 0, weak_processing_timings->phase_time_sec(wpp));
-  } else {
-    for (uint index = 0; index < weak_processing_timings->max_threads(); index ++) {
-      sh_worker_times->record_time_secs(spp, index, weak_processing_timings->worker_time_sec(index, wpp));
-    }
-  }
-}
--- a/src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp	Thu Aug 22 12:46:20 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp	Thu Aug 22 13:47:13 2019 +0200
@@ -175,15 +175,4 @@
   }
 };
 
-class ShenandoahTimingConverter : public AllStatic {
-public:
-  static void weak_processing_timing_to_shenandoah_timing(WeakProcessorPhaseTimes* weak_processing_timings,
-                                                          ShenandoahWorkerTimings* sh_worker_times);
-private:
-  static void weak_processing_phase_to_shenandoah_phase(WeakProcessorPhases::Phase wpp,
-                                                        WeakProcessorPhaseTimes* weak_processing_timings,
-                                                        ShenandoahPhaseTimings::GCParPhases spp,
-                                                        ShenandoahWorkerTimings* sh_worker_times);
-};
-
 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHUTILS_HPP