diff --git a/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp b/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp index c51f4f164895d..026f352701d29 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp @@ -141,10 +141,12 @@ "GC heuristics to use. This fine-tunes the GC mode selected, " \ "by choosing when to start the GC, how much to process on each " \ "cycle, and what other features to automatically enable. " \ - "Possible values are:" \ + "When -XX:ShenandoahGCMode is generational, the only supported " \ + "option is the default, adaptive. Possible values are:" \ " adaptive - adapt to maintain the given amount of free heap " \ "at all times, even during the GC cycle;" \ - " static - trigger GC when free heap falls below the threshold;" \ + " static - trigger GC when free heap falls below a specified " \ + "threshold;" \ " aggressive - run GC continuously, try to evacuate everything;" \ " compact - run GC more frequently and with deeper targets to " \ "free up more memory.") \ diff --git a/src/java.base/share/man/java.md b/src/java.base/share/man/java.md index f7a31fff83612..18e208f292c6b 100644 --- a/src/java.base/share/man/java.md +++ b/src/java.base/share/man/java.md @@ -2883,6 +2883,46 @@ Java HotSpot VM. expensive operations. Using a lower value will cause heap memory to be uncommitted earlier, at the risk of soon having to commit it again. +`-XX:+UseShenandoahGC` +: Enables the use of the Shenandoah garbage collector. This is a low pause + time, concurrent garbage collector. Its pause times are not proportional to + the size of the heap. Shenandoah garbage collector can work with compressed + pointers. See `-XX:UseCompressedOops` for further information about + compressed pointers. + +`-XX:ShenandoahGCMode=`*mode* +: Sets the GC mode for Shenandoah GC to use. By default, this option is set + to `satb`. Among other things, this defines which barriers are in use. + Possible mode values include the following: + + `satb` + : Snapshot-at-the-beginning concurrent GC (three pass mark-evac-update). + It is a single generation GC. + + `generational` + : It is also a snapshot-at-the-beginning and concurrent GC, but it is + generational. Please see [JEP 404](https://openjdk.org/jeps/404) and + [JEP 521](https://openjdk.org/jeps/521) for its advantages and risks. + +`-XX:ShenandoahGCHeuristics=`*heuristics* +: Sets the heuristics for Shenandoah GC to use. By default, this option is + set to `adaptive`. This fine-tunes the GC mode selected, by choosing when + to start the GC, how much to process on each cycle, and what other features + to automatically enable. When `-XX:ShenandoahGCMode` is `generational`, the + only supported option is the default, `adaptive`. + + Possible heuristics are the following: + + `adaptive` + : To maintain the given amount of free heap at all times, even during + the GC cycle. + + `static` + : Trigger GC when free heap falls below a specified threshold. + + `compact` + : Run GC more frequently and with deeper targets to free up more memory. + ## Deprecated Java Options These `java` options are deprecated and might be removed in a future JDK