RFR (XS) 8245814: Shenandoah: reconsider format specifiers for stats
Roman Kennke
rkennke at redhat.com
Wed May 27 11:10:32 UTC 2020
Ok, looks good!
Roman
On Tue, 2020-05-26 at 16:44 +0200, Aleksey Shipilev wrote:
> RFE:
> https://bugs.openjdk.java.net/browse/JDK-8245814
>
> Current log is misplaced because "CWR: Resolved Table Roots" is
> larger than the format specifier for
> it. Let's bump the specifier lengths. Also, make sure the
> US_WORKER_TIME_FORMAT matches the "empty"
> slot. I did it while changing its length from 3 to 4, but ultimately
> decided to keep at 3.
>
> Fix:
>
> diff -r bdeba1590341
> src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.cpp
> ---
> a/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.cpp T
> ue May 26 16:36:08 2020 +0200
> +++
> b/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.cpp T
> ue May 26 16:42:43 2020 +0200
> @@ -34,8 +34,9 @@
> #include "utilities/ostream.hpp"
>
> -#define SHENANDOAH_PHASE_NAME_FORMAT "%-28s"
> +#define SHENANDOAH_PHASE_NAME_FORMAT "%-30s"
> #define SHENANDOAH_S_TIME_FORMAT "%8.3lf"
> #define SHENANDOAH_US_TIME_FORMAT "%8.0lf"
> #define SHENANDOAH_US_WORKER_TIME_FORMAT "%3.0lf"
> +#define SHENANDOAH_US_WORKER_NOTIME_FORMAT "%3s"
> #define SHENANDOAH_PARALLELISM_FORMAT "%4.2lf"
>
> @@ -244,5 +245,5 @@
> out->print(SHENANDOAH_US_WORKER_TIME_FORMAT ", ", tv *
> 1000000.0);
> } else {
> - out->print("%3s, ", "---");
> + out->print(SHENANDOAH_US_WORKER_NOTIME_FORMAT ", ", "---
> ");
> }
> }
>
> Testing: hotspot_gc_shenandoah, eyeballing GC logs.
>
More information about the shenandoah-dev
mailing list