RFR (S) 8180482: Reformat -XX:+PrintSafepointStatistics table

David Holmes david.holmes at oracle.com
Wed May 17 12:19:54 UTC 2017


Hi Aleksey,

On 17/05/2017 9:02 PM, Aleksey Shipilev wrote:
> https://bugs.openjdk.java.net/browse/JDK-8180482
>
> Current table is garbled because VM ops names are too long, headers are not
> accounted in format specifiers, etc.
>
> Patch:
>   http://cr.openjdk.java.net/~shade/8180482/webrev.01/

Can't say I like all the magic numbers. Is this:

   tty->print("[ %5s %7s %7s %7s %7s %7s ] ",
              "time:", "spin", "block", "sync", "cleanup", "vmop");

really worth the effort versus:

    // widest column name needs 7 chars so space accordingly
   tty->print("[ time:    spin   block    sync cleanup    vmop ]");

?

There's nothing to link the width specifiers in the header with those 
used in the print function.

David

> Before/after:
>   http://cr.openjdk.java.net/~shade/8180482/before.txt
>   http://cr.openjdk.java.net/~shade/8180482/after.txt
>
> Thanks,
> -Aleksey
>


More information about the hotspot-dev mailing list