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

David Holmes david.holmes at oracle.com
Wed May 17 21:09:29 UTC 2017


On 17/05/2017 11:24 PM, Aleksey Shipilev wrote:
> Hi David,
>
> On 05/17/2017 02:19 PM, David Holmes wrote:
>> On 17/05/2017 9:02 PM, Aleksey Shipilev wrote:
>>> 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 ]");
>>
>> ?
>
> Agreed, it was easier to handle with width specifiers when tidying up the code.
> The final version can just use the appropriate number of spaces:
>   http://cr.openjdk.java.net/~shade/8180482/webrev.02/

Looks much simpler :)

This is also overkill for adding spaces:

1269     tty->print("[ %5s "

but I'd take it as-is as well. Don't forget to update copyright year 
before pushing.

I think this qualifies as a trivial change (only one Reviewer needed).

Thanks,
David

> Thanks,
> -Aleksey
>


More information about the hotspot-dev mailing list