RFR: 8364081: Shenandoah & GenShen logging improvement [v2]

Rui Li duke at openjdk.org
Fri Jul 25 15:55:10 UTC 2025


> Fix missing `increment_total_collections` usages in Shenandoah (otherwise, the invocation count is always 0 as shown in https://github.com/openjdk/jdk/pull/26272 overview). 
> 
> Also added some generational information for generational shenandoah logging.
> 
> Shenandoah logging samples:
> 
> 
> ######################
> Shenandoah - Beore GC
> ######################
> [0.161s][debug][gc,heap      ] GC(0) Heap Before GC invocations=0 (full 0):
> [0.161s][debug][gc,heap      ] GC(0)  Shenandoah Heap
> [0.161s][debug][gc,heap      ] GC(0)    100M max, 100M soft max, 100M committed, 40312K used
> [0.161s][debug][gc,heap      ] GC(0)   400 x 256K regions
> [0.161s][debug][gc,heap      ] GC(0)  Status: not cancelled
> [0.161s][debug][gc,heap      ] GC(0)  Reserved region:
> [0.161s][debug][gc,heap      ] GC(0)   - [0x00000000f9c00000, 0x0000000100000000) 
> [0.161s][debug][gc,heap      ] GC(0)  Collection set:
> [0.161s][debug][gc,heap      ] GC(0)   - map (vanilla): 0x0000000000004e70
> [0.161s][debug][gc,heap      ] GC(0)   - map (biased):  0x0000000000001000
> [0.161s][debug][gc,heap      ] GC(0) 
> [0.161s][debug][gc,metaspace ] GC(0) Metaspace Before GC invocations=0 (full 0):
> [0.161s][debug][gc,metaspace ] GC(0)  Metaspace       used 86K, committed 320K, reserved 1114112K
> [0.161s][debug][gc,metaspace ] GC(0)   class space    used 3K, committed 128K, reserved 1048576K
> 
> ######################
> Shenandoah - After GC
> ######################
> [2.179s][debug][gc,heap        ] GC(9) Heap After GC invocations=17 (full 7):
> [2.179s][debug][gc,heap        ] GC(9)  Shenandoah Heap
> [2.179s][debug][gc,heap        ] GC(9)    100M max, 100M soft max, 100M committed, 97113K used
> [2.179s][debug][gc,heap        ] GC(9)   400 x 256K regions
> [2.179s][debug][gc,heap        ] GC(9)  Status: not cancelled
> [2.179s][debug][gc,heap        ] GC(9)  Reserved region:
> [2.179s][debug][gc,heap        ] GC(9)   - [0x00000000f9c00000, 0x0000000100000000) 
> [2.179s][debug][gc,heap        ] GC(9)  Collection set:
> [2.179s][debug][gc,heap        ] GC(9)   - map (vanilla): 0x0000000000004e70
> [2.179s][debug][gc,heap        ] GC(9)   - map (biased):  0x0000000000001000
> [2.179s][debug][gc,heap        ] GC(9) 
> [2.179s][debug][gc,metaspace   ] GC(9) Metaspace After GC invocations=17 (full 7):
> [2.179s][debug][gc,metaspace   ] GC(9)  Metaspace       used 125K, committed 320K, reserved 1114112K
> [2.179s][debug][gc,metaspace   ] GC(9)   class space    used 4K, committed 128K, reserved 1048576K
> 
> 
> Generational Shenandoah logging samples
> 
> #############...

Rui Li 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:

  8364081: Shenandoah & GenShen logging improvement

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/26469/files
  - new: https://git.openjdk.org/jdk/pull/26469/files/235aac2f..1d51fcff

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=26469&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26469&range=00-01

  Stats: 7 lines in 2 files changed: 1 ins; 5 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/26469.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26469/head:pull/26469

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


More information about the hotspot-gc-dev mailing list