RFR: 8270100: Fix some inaccurate GC logging [v2]

Volker Simonis simonis at openjdk.java.net
Wed Jul 14 08:12:33 UTC 2021


> If running with `-Xlog:gc+heap*=trace` the JVM will print the extra per thread amount which is added to the new generation on resize:
> 
> [0,105s][debug][gc,ergo,heap ] GC(0) New generation size 34112K->34176K [eden=27392K,survivor=3392K]
> [0,105s][trace][gc,ergo,heap ] GC(0) [allowed 0K extra for 0 threads]
> 
> Currently this will always print "0K extra for 0 threads" no matter how much extra space was added.
> 
> Also, the shrink factor will always be printed to be 0%, even if we run with `-XX:-ShrinkHeapInSteps` which pins the shrink factor at 100%:
> 
> [13,213s][trace][gc,heap ] GC(34) shrink_bytes: 463564,0K current_shrink_factor: 0 new shrink factor: 0 _min_heap_delta_bytes: 192,0K
> [13,239s][trace][gc,heap ] GC(34) Shrinking tenured generation from 531852K to 68288K
> 
> 
> The fix is trivial.

Volker Simonis has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:

  8270100: Fix some inaccurate GC logging

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/4727/files
  - new: https://git.openjdk.java.net/jdk/pull/4727/files/dcb1f71e..afef6ad4

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4727&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4727&range=00-01

  Stats: 53 lines in 4 files changed: 20 ins; 9 del; 24 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4727.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4727/head:pull/4727

PR: https://git.openjdk.java.net/jdk/pull/4727


More information about the hotspot-gc-dev mailing list