Add garbage collector info to process info contributor #44704
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since GC algorithms can be selected by JVM ergonomics, it might not be trivial to know them since the decision usually depends on the available processors and the available memory. Especially in (containerized) environments where resource usage can be isolated (for example using control groups) or not necessarily trivial to discover.
Example outputs (click to reveal)
BellSoft Liberica
23+38
-XX:+UseSerialGC
-XX:+UseParallelGC
-XX:+UseG1GC
-XX:+UseZGC
(Generational ZGC)-XX:+UseZGC -XX:-ZGenerational
(Non-Generational ZGC)-XX:+UseShenandoahGC
-XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC
(YOLO)No CMS since it was removed in Java 14 and no Generational Shenandoah since it will be introduced in Java 24.
IBM Semeru
23.0.2+7
, OpenJ90.49.0
-Xgcpolicy:balanced
-Xgc:concurrentScavenge
BellSoft Liberica NIK
23.0.0-1
GraalVM Community
17.0.7+7-LTS
, native-image (SubstrateVM), G1 GC