Add gc-basics: Java garbage collection explained and measured on JDK 25, 27, 28 EA

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b44MquEzmd9QMkZCd7
This commit is contained in:
asmhatre
2026-11-24 06:46:39 +05:30
co-authored by Claude Sonnet 5.5
parent f7b6c1efca
commit 876ae1bb5c
36 changed files with 948 additions and 1 deletions
+25
View File
@@ -0,0 +1,25 @@
# Shenandoah: which mode is the default, and is the generational mode still experimental? (mode read from -Xlog:gc+init)
## JDK 25, no mode flag
$ java -XX:+UseShenandoahGC -Xlog:gc+init -version | grep Mode
[0.008s][info][gc,init] Mode: Snapshot-At-The-Beginning (SATB)
## JDK 27, no mode flag
$ java -XX:+UseShenandoahGC -Xlog:gc+init -version | grep Mode
[0.007s][info][gc,init] Mode: Snapshot-At-The-Beginning (SATB)
## JDK 28, no mode flag
$ java -XX:+UseShenandoahGC -Xlog:gc+init -version | grep Mode
[0.014s][info][gc,init] Mode: generational
## JDK 25: generational mode without -XX:+UnlockExperimentalVMOptions
$ java -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational -Xlog:gc+init -version
[0.011s][info][gc,init] Mode: Generational
## JDK 24-style spelling on 25 (the unlock flag is now unnecessary but harmless)
[0.012s][info][gc,init] Mode: Generational
## JDK 28 early access: asking for the old mode explicitly
$ java -XX:+UseShenandoahGC -XX:ShenandoahGCMode=satb -Xlog:gc+init -version
[0.007s][info][gc,init] Mode: satb
(no deprecation warning is printed by this early-access build)