Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/java.base/share/man/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -2900,7 +2900,7 @@ Java HotSpot VM.

`passive`
: Stop the world GC only (either degenerated or full). This mode is
diagnostic, and must be enabled via `-XX:+UnlockDiagnosticVMOptions`.
diagnostic, and must be enabled via `-XX:+UnlockDiagnosticVMOptions`.

`generational`
: Generational concurrent GC.
Expand All @@ -2919,7 +2919,8 @@ Java HotSpot VM.
: Trigger GC when free heap falls below the ShenandoahMinFreeThreshold.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here: ShenandoahMinFreeThreshold is experimental, it is not worth mentioning here. In fact, there are tunables for adaptive and compact as well, yet we do not (correctly!) mention them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, other options respond to ShenandoahMinFreeThreshold as well. It's kinda hard to describe static option without mentioning the threshold.

  • We could make the doc vague as in the shenandoah_globals.hpp: trigger GC when free heap falls below the threshold.
  • I now wonder why static is a non experimental flag - it has to be used with other experimental flags. Maybe just drop static from man page as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

below a specified threshold might sound appropriately vague and render the flag unusable unless one consulted the code, underlining the experimental nature of it.

If the collector respects static as specified, it can be considered a good guardrail to use in anger. In fact, I know of teams that do in production. (For that matter, there are a couple who use compact as well.)

However, I am fine with eliding all experimental options, and in turn any non-experimental options that depend on experimental options (which however seems to be an anti-pattern to be avoided, if possible).


`aggressive`
: Run GC continuously, try to evacuate everything.
: Run GC continuously, try to evacuate everything. This heuristics is
diagnostic, and must be enabled via -XX:+UnlockDiagnosticVMOptions.

`compact`
: Run GC more frequently and with deeper targets to free up more memory.
Expand Down