RFR (S) 8217315: Proper units should print more significant digits
Aleksey Shipilev
shade at redhat.com
Thu Jan 17 14:37:58 UTC 2019
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