RFR (S) 8217315: Proper units should print more significant digits

Thomas Stüfe thomas.stuefe at gmail.com
Thu Jan 17 15:08:23 UTC 2019


Looks good to me too.

A better solution may be printing as float, see e.g.
"print_human_readable_size" in metaspaceCommon.cpp . But that is outside
the scope of your change.

As for the test, note that you could include all sizes up to the last one
(50G) in 32bit too.

..Thomas

On Thu, Jan 17, 2019 at 3:39 PM Aleksey Shipilev <shade at redhat.com> wrote:

> RFE:
>   https://bugs.openjdk.java.net/browse/JDK-8217315
>
> Fix:
>   http://cr.openjdk.java.net/~shade/8217315/webrev.01/
>
> This bothered me for quite some time. Our current rounding code in "proper
> units" cuts off to next
> suffix after "10" units, which makes the values too coarse all of the
> sudden. With current
> two-significant-digits code, the rounding error can be as bad as 10% (for
> example, both 10.0G vs
> 10.(9)G would round down to 10G). I suggest we allow at least three
> significant digits, dropping
> that max error to 1%, and making the logs more precise. The difference in
> e.g. Epsilon logs is
> clearly visible:
>
> Now:
>   [25.186s][info][gc] Heap: 100G reserved, 15G (15.09%) committed, 15G
> (15.00%) used
>
> After the patch:
>   [23.315s][info][gc] Heap: 100G reserved, 15449M (15.09%) committed,
> 15361M (15.00%) used
>
> I'd like to push it to jdk/jdk, see if there are higher-tier tests that
> expect something else, and
> then backport it to 12u, 11u, 8u.
>
> Testing: new gtest, hotspot tier1, jdk-submit
>
> Thanks,
> -Aleksey
>
>


More information about the hotspot-dev mailing list