Skip to content

Conversation

rgithubli
Copy link
Contributor

@rgithubli rgithubli commented Aug 22, 2025

Add documentation of Shenandoah to java man page

Aside from -XX:+UseShenandoahGC, I picked flags from shenandoah_globals.hpp that are at product level but not experimental / diagnostic to avoid overwhelming info. Two additional flags match: ShenandoahGCMode and ShenandoahGCHeuristics


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8246037: Shenandoah: update man pages to mention -XX:+UseShenandoahGC (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26907/head:pull/26907
$ git checkout pull/26907

Update a local copy of the PR:
$ git checkout pull/26907
$ git pull https://git.openjdk.org/jdk.git pull/26907/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 26907

View PR using the GUI difftool:
$ git pr show -t 26907

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26907.diff

Using Webrev

Link to Webrev Comment

@rgithubli rgithubli marked this pull request as ready for review August 22, 2025 18:36
@bridgekeeper
Copy link

bridgekeeper bot commented Aug 22, 2025

👋 Welcome back rgithubli! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Aug 22, 2025

@rgithubli This change is no longer ready for integration - check the PR body for details.

@openjdk
Copy link

openjdk bot commented Aug 22, 2025

@rgithubli The following label will be automatically applied to this pull request:

  • graal

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added graal graal-dev@openjdk.org rfr Pull request is ready for review labels Aug 22, 2025
@mlbridge
Copy link

mlbridge bot commented Aug 22, 2025

Webrevs

@ysramakrishna
Copy link
Member

/label remove graal

@openjdk openjdk bot removed the graal graal-dev@openjdk.org label Aug 23, 2025
@openjdk
Copy link

openjdk bot commented Aug 23, 2025

@ysramakrishna
The graal label was successfully removed.

@openjdk openjdk bot removed the rfr Pull request is ready for review label Aug 23, 2025
@rgithubli
Copy link
Contributor Author

/label add hotspot

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Aug 23, 2025
@openjdk
Copy link

openjdk bot commented Aug 23, 2025

@rgithubli
The hotspot label was successfully added.

@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 23, 2025
Comment on lines +2898 to +2899
`satb`
: Snapshot-at-the-beginning concurrent GC (three pass mark-evac-update).
Copy link
Member

Choose a reason for hiding this comment

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

This is a long-standing problem with the name. It kinda implies generational is not satb. It actually is. Maybe we should rename satb to single or something. A lot of bikeshedding would ensue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renaming the value of an existing jvm arg sounds intrusive, unless we can add an alias link from satb to single? Alternatively, we probably can add comment in generational to indicate it's also satb?

Copy link
Member

Choose a reason for hiding this comment

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

I agree. For non-experimental options, we can follow the established deprecate & rename protocol.

May be we could, in the inerim, add verbage in the description to avoid the confusion in the current naming as described by Aleksey.

the GC cycle.

`static`
: 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).

@rgithubli
Copy link
Contributor Author

Updated for other comments except for renaming satb: instead, I added additional explanation to say satb is a single generation GC, as well as generational shenandoah is also an satb gc.

Copy link
Member

@ysramakrishna ysramakrishna left a comment

Choose a reason for hiding this comment

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

One small comment/suggestion. Rest looks good to me.

Approving modulo that suggestion.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 27, 2025
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Aug 28, 2025
@rgithubli
Copy link
Contributor Author

rgithubli commented Aug 28, 2025

/integrate Need approval again

@openjdk
Copy link

openjdk bot commented Aug 28, 2025

@rgithubli This pull request has not yet been marked as ready for integration.

Copy link
Member

@ysramakrishna ysramakrishna left a comment

Choose a reason for hiding this comment

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

Approved modulo a comment.

I also think we should to the extent possible make the listing of text common to man page and options list consistent. An example is the recent improvement you made in your most recent update to the man page for the heuristics option. There may be other changes to the man page that came about as a result of this review. It would make sense to make those changes, where applicable, also to shenandoah_globals. This latter need not hold up this ticket but can be addressed separately in a follow up.

Comment on lines 2913 to 2914
Possible heuristics are the following (when `-XX:ShenandoahGCMode` is
`generational`, the only supported option is the default, `adaptive`):
Copy link
Member

Choose a reason for hiding this comment

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

Move the parenthetic part to the previous paragraph and out of parentheses.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 28, 2025
@shipilev
Copy link
Member

Make sure that someone outside Shenandoah devs looks at this patch to sanity check how it reads.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Aug 28, 2025
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 28, 2025
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Aug 28, 2025
Copy link
Contributor

@JohnTortugo JohnTortugo left a comment

Choose a reason for hiding this comment

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

Ship it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

5 participants