RFR: 8337511: Implement JEP 404: Generational Shenandoah (Experimental) [v6]

Aleksey Shipilev shade at openjdk.org
Thu Nov 14 19:34:15 UTC 2024


On Thu, 14 Nov 2024 19:12:25 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> No objections here. @ysramakrishna , @kdnilsen ?
>
> See, with current code, default Shenandoah prints this:
> 
> 
> [0.025s][info][gc] GC(0) Concurrent reset (NON-GENERATIONAL) (unload classes) 0.135ms
> [0.025s][info][gc] GC(0) Pause Init Mark (NON-GENERATIONAL) (unload classes) 0.018ms
> [0.025s][info][gc] GC(0) Concurrent marking roots 0.097ms
> [0.029s][info][gc] GC(0) Concurrent marking (NON-GENERATIONAL) (unload classes) 4.050ms
> [0.029s][info][gc] GC(0) Pause Final Mark (NON-GENERATIONAL) (unload classes) 0.123ms
> [0.029s][info][gc] GC(0) Concurrent thread roots 0.205ms
> [0.029s][info][gc] GC(0) Concurrent weak references (NON-GENERATIONAL) (unload classes) 0.014ms
> [0.029s][info][gc] GC(0) Concurrent weak roots (NON-GENERATIONAL) (unload classes) 0.047ms
> [0.029s][info][gc] GC(0) Concurrent cleanup (NON-GENERATIONAL) (unload classes) 40M->40M(2064M) 0.006ms
> [0.029s][info][gc] GC(0) Concurrent class unloading 0.035ms
> [0.029s][info][gc] GC(0) Concurrent strong roots 0.119ms
> 
> 
> This is not great: experimental GenShen should not affect the logging for current product code. There is a risk we would be breaking some GC parsers if we change it.

While we are at it, we should probably replace `YOUNG` -> `Young`, etc, and figure out if `Transition from`, `Heuristics request`, and ` Periodic Sample:` should be in `gc=debug`,  so logs are cleaner:


[7.514s][info][gc] Transition from: normal to: idle
[7.617s][info][gc] Trigger (YOUNG): Average GC time (123.52 ms) is above the time for average allocation rate (2868 MB/s) to deplete free headroom (350M) (margin of error = 1.79)
[7.617s][info][gc] Transition from: idle to: normal
[7.617s][info][gc] Heuristics request for young collection accepted
[7.618s][info][gc] GC(31) Concurrent reset (YOUNG) 1.095ms
[7.618s][info][gc] GC(31) Pause Init Mark (YOUNG) 0.026ms
[7.618s][info][gc] GC(31) Concurrent remembered set scanning 0.148ms
[7.618s][info][gc] GC(31) Concurrent marking roots 0.217ms
[7.680s][info][gc] GC(31) Concurrent marking (YOUNG) 61.990ms
[7.681s][info][gc] GC(31) Transfer 1 region(s) from OLD to YOUNG, yielding increased size: 1021M
[7.681s][info][gc] GC(31) Transfer 1 region(s) from YOUNG to OLD, yielding increased size: 3584K
[7.681s][info][gc] GC(31) Pause Final Mark (YOUNG) 0.246ms
[7.681s][info][gc] GC(31) Concurrent thread roots 0.041ms
[7.728s][info][gc] GC(31) Concurrent weak references (YOUNG) 47.278ms
[7.728s][info][gc] GC(31) Concurrent weak roots (YOUNG) 0.114ms
[7.728s][info][gc] GC(31) Concurrent cleanup (YOUNG) 674M->658M(1024M) 0.014ms
[7.728s][info][gc] GC(31) Concurrent strong roots 0.217ms
[7.730s][info][gc] GC(31) Concurrent evacuation 1.879ms
[7.730s][info][gc] GC(31) Pause Init Update Refs 0.010ms
[7.730s][info][gc] GC(31) Transfer 1 region(s) from OLD to YOUNG, yielding increased size: 1021M
[7.739s][info][gc] GC(31) Concurrent update references 8.651ms
[7.739s][info][gc] GC(31) Concurrent update thread roots 0.069ms
[7.739s][info][gc] GC(31) Transfer 1 region(s) from YOUNG to OLD, yielding increased size: 3584K
[7.739s][info][gc] GC(31) Pause Final Update Refs 0.076ms
[7.739s][info][gc] GC(31) Concurrent cleanup (YOUNG) 690M->135M(1024M) 0.078ms

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21273#discussion_r1842769207


More information about the shenandoah-dev mailing list