Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8227106: InitiatingHeapOccupancyPercent is G1-specific but defined in shared #1217

Closed
wants to merge 1 commit into from

Conversation

lgxbslgx
Copy link
Member

@lgxbslgx lgxbslgx commented Nov 16, 2020

Hi all,

Please review this little fix of G1.
The command line option InitiatingHeapOccupancyPercent is G1-specific. But it is defined in shared/gc_globals.hpp rather than g1/g1_globals.hpp. This patch moves it to the proper location.
Thank you for taking the time to review.

Best Regards.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Testing

Linux aarch64 Linux arm Linux ppc64le Linux s390x Linux x64 Linux x86 Windows x64 macOS x64
Build ✔️ (1/1 passed) ✔️ (1/1 passed) ✔️ (1/1 passed) ✔️ (1/1 passed) ✔️ (5/5 passed) ✔️ (2/2 passed) ✔️ (2/2 passed) ✔️ (2/2 passed)
Test (tier1) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed)

Issue

  • JDK-8227106: InitiatingHeapOccupancyPercent is G1-specific but defined in shared

Download

$ git fetch https://git.openjdk.java.net/jdk pull/1217/head:pull/1217
$ git checkout pull/1217

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Nov 16, 2020

👋 Welcome back lgxbslgx! 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 openjdk bot added the rfr label Nov 16, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 16, 2020

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

  • hotspot-gc

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 the hotspot-gc label Nov 16, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Nov 16, 2020

Webrevs

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Dec 14, 2020

@lgxbslgx This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jan 11, 2021

@lgxbslgx This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it!

@bridgekeeper bridgekeeper bot closed this Jan 11, 2021
@tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Jan 12, 2021

Hi,

first, apologies for the late reply and actually having this PR get automatically closed due to inactivity.

Unfortunately, simply moving the InitiatingHeapOccupancyPercent flag to the other file is not sufficient to complete this problem properly. The move to that file implies that the flag will not be available for VM builds without G1 any more, possibly breaking lots of existing deployments - and there are lots of them using that flag.
Further, flags in that file should all have a G1 prefix clearly indicating that this is a G1 specific flag.

So a proper path to this "simple" move would probably be:

  1. Deprecate InitiatingHeapOccupancyPercent so that people can still use it the next few releases. Basically add it at the proper location in special_jvm_flags (best grep it).
  2. Create a new flag "G1InitiatingHeapOccupancyPercent" and alias the other to this one (and add code handling if both are specified etc).
  3. Change the code including the tests to use the new flag.
  4. Fix the documentation (which we would need to do as the documentation sources are not public)

These two steps require a CSR - I think a single one is sufficient renaming the flag.

  1. At some point in the future a few releases out, obsolete and another release ahead, remove the old flag.

(I will also add this information to the CR in JIRA)

Tbh it's lots of work for not a lot of gain and a certain degree of disruption for end users so it might not be worth it.
However I will support you (with improved turnaround time) if you want to continue on that path, as in the end it's work that should be done.

Thanks,
Thomas

@lgxbslgx
Copy link
Member Author

@lgxbslgx lgxbslgx commented Jan 12, 2021

@tschatzl Thank you for your reply.

Maybe the designer want other GC to reuse InitiatingHeapOccupancyPercent in the future.
We should do more investigations about the possible useful situations before we restart this work.

@tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Jan 12, 2021

It seems unlikely that this flag will be reused soon: both of the other concurrent collectors, ZGC and Shenandoah, have their own heuristics with their own set of flags that do not exactly match the semantics of InitiatingHeapOccupancyPercent.

Feel free to keep this PR closed though for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-gc rfr
2 participants