-
Enhancement
-
Resolution: Fixed
-
P4
-
8, 11, 12, 13
-
b05
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8219341 | 12.0.2 | Aleksey Shipilev | P4 | Resolved | Fixed | b01 |
JDK-8226580 | 11.0.5-oracle | Aleksey Shipilev | P4 | Resolved | Fixed | b02 |
JDK-8219346 | 11.0.3 | Aleksey Shipilev | P4 | Resolved | Fixed | master |
JDK-8223525 | openjdk8u222 | Aleksey Shipilev | P4 | Resolved | Fixed | b02 |
inline const char* proper_unit_for_byte_size(size_t s) {
#ifdef _LP64
if (s >= 10*G) {
return "G";
}
#endif
This is inconvenient for logs, because it abruptly makes values too coarse. For example, this is the usual thing to see in GC logs:
[25.186s][info][gc] Heap: 100G reserved, 15G (15.09%) committed, 15G (15.00%) used
This rounding basically masks the difference within the gigabyte, which makes the rounding error close to 10% in worst case, on 10G threshold It would be preferable instead to print more significant digits, e.g. at least three. With three significant digits, the rounding error would reach 1% at max, and checking against e.g. 100*G would yield five significant digits in worst case.
Prototype webrev:
http://cr.openjdk.java.net/~shade/8217315/webrev.01/
This is the example GC log after the patch:
[23.315s][info][gc] Heap: 100G reserved, 15449M (15.09%) committed, 15361M (15.00%) used
- backported by
-
JDK-8219341 Proper units should print more significant digits
- Resolved
-
JDK-8219346 Proper units should print more significant digits
- Resolved
-
JDK-8223525 Proper units should print more significant digits
- Resolved
-
JDK-8226580 Proper units should print more significant digits
- Resolved
- is blocked by
-
JDK-8217321 [TESTBUG] utilities/test_globalDefinitions.cpp should use _LP64, not LP64
- Resolved
- relates to
-
JDK-8232100 GC timings should use proper units for heap sizes
- Open
-
JDK-8058221 Rounding in log output makes evaluation difficult
- Open
-
JDK-8232102 Shenandoah: print everything in proper units
- Resolved