RFR: 8364532: G1: In liveness tracing, print more significant digits for the liveness value [v2]

Thomas Schatzl tschatzl at openjdk.org
Tue Aug 5 16:26:38 UTC 2025


> Hi all,
> 
>   please review this small change that adds some more significant digits (3 in total) for the "liveness" column in collection set group logging.
> 
> E.g. see the emphasized columns that lack precision (it's more irritating with lots of lines showing single-digit values):
> 
> 50.707s][trace][gc,liveness] GC(13) ### groud-id num-regions gc-eff liveness remset type
> 50.707s][trace][gc,liveness] GC(13) ### (bytes/ms) % (bytes)
> 50.707s][trace][gc,liveness] GC(13) ### 1 70       0.0 *100* 3199208 Y
> 50.707s][trace][gc,liveness] GC(13) ### 2 51 5298129.5  *18* 1224072 M
> 50.707s][trace][gc,liveness] GC(13) ### 3  5 3223983.6  *31*  176648 M
> 50.707s][trace][gc,liveness] GC(13) ### 4  5 3022016.3  *32*  176648 M
> 
> 
> (This depends on PR#26591, so please look at that one first).
> 
> The change makes sure that three significant digits are printed.
> 
> Testing: manual review
> 
> Thanks,
>   Thomas

Thomas Schatzl has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:

 - Merge branch '8364531-factor-out-liveness-code' into 8364532-liveness-significant-digits
 - * use one line per parameter in log message
 - * rename liveness() method to more accurate liveness_percent()
 - 8364532
   
   Hi all,
   
     please review this small change that adds some more significant digits (3 in total) for the "liveness" column in collection set group logging
   
   Testing: manual testing
   
   Thanks,
     Thomas
 - 8364531
   
   Hi all,
   
     please review this refactoring, eliminating some copy&paste, in cset candidate group liveness logging.
   
   The output is mostly the same, except for the young cset group, where the "-" has been replaced to just print the default value (0.0) for efficiency. I did not see this important to have, the gc efficiency for young gen isn't interesting.
   
   Testing: local compilation, gha, visual inspection of output
   
   Thanks,
     Thomas

-------------

Changes: https://git.openjdk.org/jdk/pull/26595/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26595&range=01
  Stats: 67 lines in 4 files changed: 21 ins; 36 del; 10 mod
  Patch: https://git.openjdk.org/jdk/pull/26595.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26595/head:pull/26595

PR: https://git.openjdk.org/jdk/pull/26595


More information about the hotspot-gc-dev mailing list