RFR (XS) 8243463: Shenandoah: ditch total_pause counters

Roman Kennke rkennke at redhat.com
Thu Apr 23 08:31:44 UTC 2020


Ok. I kinda liked them as a first-glance measure, but they are not *so*
useful after all.

Thanks,
Roman


> RFE:
>   https://bugs.openjdk.java.net/browse/JDK-8243463
> 
> total_pause counters make ShenandoahGCPhase nesting awkward, and also take the timing measurement
> twice on common path. They are also not very convenient, because they average over completely
> different pauses. We should consider removing these counters. It would also help future work on
> per-cycle counters printout, where total-pauses make little sense.
> 
> Fix:
> 
> diff -r 6c14c6b234ed src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Thu Apr 23 07:49:52 2020 +0200
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Thu Apr 23 08:31:29 2020 +0200
> @@ -2693,3 +2693,2 @@
>    TraceCollectorStats tcs(monitoring_support()->stw_collection_counters());
> -  ShenandoahGCPhase total(ShenandoahPhaseTimings::total_pause_gross);
>    ShenandoahGCPhase phase(ShenandoahPhaseTimings::init_mark_gross);
> @@ -2703,3 +2702,2 @@
>    TraceCollectorStats tcs(monitoring_support()->stw_collection_counters());
> -  ShenandoahGCPhase total(ShenandoahPhaseTimings::total_pause_gross);
>    ShenandoahGCPhase phase(ShenandoahPhaseTimings::final_mark_gross);
> @@ -2713,3 +2711,2 @@
>    TraceCollectorStats tcs(monitoring_support()->stw_collection_counters());
> -  ShenandoahGCPhase total(ShenandoahPhaseTimings::total_pause_gross);
>    ShenandoahGCPhase phase(ShenandoahPhaseTimings::init_update_refs_gross);
> @@ -2723,3 +2720,2 @@
>    TraceCollectorStats tcs(monitoring_support()->stw_collection_counters());
> -  ShenandoahGCPhase total(ShenandoahPhaseTimings::total_pause_gross);
>    ShenandoahGCPhase phase(ShenandoahPhaseTimings::final_update_refs_gross);
> @@ -2733,3 +2729,2 @@
>    TraceCollectorStats tcs(monitoring_support()->full_stw_collection_counters());
> -  ShenandoahGCPhase total(ShenandoahPhaseTimings::total_pause_gross);
>    ShenandoahGCPhase phase(ShenandoahPhaseTimings::full_gc_gross);
> @@ -2743,3 +2738,2 @@
>    TraceCollectorStats tcs(monitoring_support()->full_stw_collection_counters());
> -  ShenandoahGCPhase total(ShenandoahPhaseTimings::total_pause_gross);
>    ShenandoahGCPhase phase(ShenandoahPhaseTimings::degen_gc_gross);
> @@ -2755,3 +2749,2 @@
> 
> -  ShenandoahGCPhase total_phase(ShenandoahPhaseTimings::total_pause);
>    ShenandoahGCPhase phase(ShenandoahPhaseTimings::init_mark);
> @@ -2770,3 +2763,2 @@
> 
> -  ShenandoahGCPhase total_phase(ShenandoahPhaseTimings::total_pause);
>    ShenandoahGCPhase phase(ShenandoahPhaseTimings::final_mark);
> @@ -2785,3 +2777,2 @@
> 
> -  ShenandoahGCPhase total_phase(ShenandoahPhaseTimings::total_pause);
>    ShenandoahGCPhase phase(ShenandoahPhaseTimings::init_update_refs);
> @@ -2798,3 +2789,2 @@
> 
> -  ShenandoahGCPhase total_phase(ShenandoahPhaseTimings::total_pause);
>    ShenandoahGCPhase phase(ShenandoahPhaseTimings::final_update_refs);
> @@ -2813,3 +2803,2 @@
> 
> -  ShenandoahGCPhase total_phase(ShenandoahPhaseTimings::total_pause);
>    ShenandoahGCPhase phase(ShenandoahPhaseTimings::full_gc);
> @@ -2829,3 +2818,2 @@
> 
> -  ShenandoahGCPhase total_phase(ShenandoahPhaseTimings::total_pause);
>    ShenandoahGCPhase phase(ShenandoahPhaseTimings::degen_gc);
> diff -r 6c14c6b234ed src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp	Thu Apr 23 07:49:52 2020 +0200
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp	Thu Apr 23 08:31:29 2020 +0200
> @@ -59,5 +59,2 @@
>  #define SHENANDOAH_GC_PHASE_DO(f)                                                      \
> -  f(total_pause_gross,                              "Total Pauses (G)")                \
> -  f(total_pause,                                    "Total Pauses (N)")                \
> -                                                                                       \
>    f(init_mark_gross,                                "Pause Init Mark (G)")             \
> 
> Testing: hotspot_gc_shenandoah
> 




More information about the hotspot-gc-dev mailing list