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

8333129: Move ShrinkHeapInSteps flag to Serial GC #19452

Closed
wants to merge 1 commit into from

Conversation

zhengyu123
Copy link
Contributor

@zhengyu123 zhengyu123 commented May 29, 2024

A trivial change that moves Serial GC specific flag ShrinkHeapInSteps to serial_globals.hpp


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-8333129: Move ShrinkHeapInSteps flag to Serial GC (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19452

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 29, 2024

👋 Welcome back zgu! 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 May 29, 2024

@zhengyu123 This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8333129: Move ShrinkHeapInSteps flag to Serial GC

Reviewed-by: dholmes, kbarrett

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 80 new commits pushed to the master branch:

  • 1b7d59f: 8333303: Issues with DottedVersion class
  • e304a8a: 8333307: Don't suppress jpackage logging in tests when it is detecting packaging tools in the system
  • 3634a91: 8332751: Broken link in VirtualMachine.html
  • ffb0867: 8331485: Odd Results when Parsing Scientific Notation with Large Exponent
  • 79f4998: 8321314: Reinstate disabling the compiler's default active annotation processing
  • ec88c6a: 8332917: failure_handler should execute gdb "info threads" command on linux
  • b3e29db: 8333108: Update vmTestbase/nsk/share/DebugeeProcess.java to don't use finalization
  • 11e926c: 8332777: Update JCStress test suite
  • 44c1845: 8330852: All callers of JvmtiEnvBase::get_threadOop_and_JavaThread should pass current thread explicitly
  • 922e312: 8328611: Thread safety issue in com.sun.tools.jdi.ReferenceTypeImpl::classObject
  • ... and 70 more: https://git.openjdk.org/jdk/compare/985b9ce79a2d620a8b8675d1ae6c9730d72a757f...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label May 29, 2024
@openjdk
Copy link

openjdk bot commented May 29, 2024

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

  • hotspot

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 hotspot-dev@openjdk.org label May 29, 2024
@mlbridge
Copy link

mlbridge bot commented May 29, 2024

Webrevs

@zhengyu123
Copy link
Contributor Author

/add label hotspot-gc

@zhengyu123
Copy link
Contributor Author

/label add hotspot-gc

@openjdk
Copy link

openjdk bot commented May 29, 2024

@zhengyu123 Unknown command add - for a list of valid commands use /help.

@openjdk openjdk bot added the hotspot-gc hotspot-gc-dev@openjdk.org label May 29, 2024
@openjdk
Copy link

openjdk bot commented May 29, 2024

@zhengyu123
The hotspot-gc label was successfully added.

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

@zhengyu123 I don't think we can do this in quite such a direct way. This flag was added in JDK 9 under JDK-8146436 and applied to all GC's AFAICS. Over time it seems to have been relegated to only working with SerialGC, but I can still find articles that reference it for GC tuning e.g.

https://docs.oracle.com/en/java/javase/22/gctuning/factors-affecting-garbage-collection-performance.html

So if this is indeed only for SerialGC now then we need to check when it stopped applying elsewhere and whether all the relevant docs have been updated. Then I think we would need to deprecate it for non-Serial (which is tricky because the flag deprecation process isn't intended to be runtime selective like that). I need to flag this directly with our GC team

@kimbarrett
Copy link

kimbarrett commented May 30, 2024

@zhengyu123 I don't think we can do this in quite such a direct way. This flag was added in JDK 9 under JDK-8146436 and applied to all GC's AFAICS. Over time it seems to have been relegated to only working with SerialGC, but I can still find articles that reference it for GC tuning e.g.

The flag implementation was added in CardGeneration. I'm not certain, but I think that class was only ever used
by Serial and CMS.

Copy link

@kimbarrett kimbarrett left a comment

Choose a reason for hiding this comment

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

Looks good. Disavowing triviality to give @dholmes-ora a chance to comment further.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 30, 2024
@zhengyu123
Copy link
Contributor Author

I can confirm that ShrinkHeapInSteps flag is only used in CardGeneration and CardGeneration is only used in Serial and CMS in JDK9u source.

@dholmes-ora
Copy link
Member

Apologies, I was mistakenly thinking that moving the flag would cause a runtime error for code not using Serial GC, but it will only cause an error if a VM were built without Serial GC support, which I don't think is possible.

I will file a RFE to get the GC Tuning guide updates (if @kimbarrett doesn't beat me to it :) ).

I also note that component-specific global flags don't advertise the fact they are global-specific.

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Okay. Thanks

@zhengyu123
Copy link
Contributor Author

/integrate

Thanks, @dholmes-ora and @kimbarrett

@openjdk
Copy link

openjdk bot commented May 31, 2024

Going to push as commit 79a78f0.
Since your change was applied there have been 90 commits pushed to the master branch:

  • 2f2dc22: 8330981: ZGC: Should not dedup strings in the finalizer graph
  • d481215: 8333005: Deadlock when setting or updating the inline cache
  • 7ab74c5: 8333200: Test containers/docker/TestPids.java fails Limit value -1 is not accepted as unlimited
  • a7864af: 8182774: Verify code in javap
  • 778ad00: 8308642: Unhelpful pattern switch error: illegal fall-through to a pattern
  • bb4aed9: 8332961: Parallel: Limit PSParallelCompact::verify_complete range
  • 95c8a69: 8332032: C2: Remove ExpandSubTypeCheckAtParseTime flag
  • ba323b5: 8333047: Remove arena-size-workaround in jvmtiUtils.cpp
  • 22ef827: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp
  • 2ab8ab5: 8332858: References with escapes have broken positions after they are transformed
  • ... and 80 more: https://git.openjdk.org/jdk/compare/985b9ce79a2d620a8b8675d1ae6c9730d72a757f...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 31, 2024
@openjdk openjdk bot closed this May 31, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 31, 2024
@openjdk
Copy link

openjdk bot commented May 31, 2024

@zhengyu123 Pushed as commit 79a78f0.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org hotspot-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants