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

8347256: Epsilon: Demote heap size and AlwaysPreTouch warnings to info level #22965

Closed

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Jan 8, 2025

For Epsilon, we have added log_warning messages when heap size and AlwaysPreTouch configuration is not great with JDK-8232051. Unfortunately, this means we print this warning all the time, even though users might not actually run into problems there, or when users tried to implement these suggestions and still decided to run against them.

I think we want to emit the suggestions in the normal GC log instead, so they are not printed all the time. Additionally, I moved the printing at the end of init logger, so it does not come in the middle of gc,init block.

Output before:

$ java -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC Hello.java 
[0.008s][warning][gc,init] Consider setting -Xms equal to -Xmx to avoid resizing hiccups
[0.008s][warning][gc,init] Consider enabling -XX:+AlwaysPreTouch to avoid memory commit hiccups
Hello!

$ java -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc Hello.java 
[0.008s][info][gc] Using Epsilon
[0.008s][warning][gc,init] Consider setting -Xms equal to -Xmx to avoid resizing hiccups
[0.008s][warning][gc,init] Consider enabling -XX:+AlwaysPreTouch to avoid memory commit hiccups
Hello!
[0.757s][info   ][gc     ] Heap: 1024M reserved, 129M (12.60%) committed, 23906K (2.28%) used

Output after:

$ java -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC Hello.java 
Hello!

$ java -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xlog:gc Hello.java 
[0.009s][info][gc] Using Epsilon
[0.009s][info][gc] Consider setting -Xms equal to -Xmx to avoid resizing hiccups
[0.009s][info][gc] Consider enabling -XX:+AlwaysPreTouch to avoid memory commit hiccups
Hello!
[0.753s][info][gc] Heap: 1024M reserved, 129M (12.60%) committed, 23908K (2.28%) used

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-8347256: Epsilon: Demote heap size and AlwaysPreTouch warnings to info level (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22965

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 8, 2025

👋 Welcome back shade! 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 Jan 8, 2025

@shipilev 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:

8347256: Epsilon: Demote heap size and AlwaysPreTouch warnings to info level

Reviewed-by: tschatzl, phh

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 44 new commits pushed to the master branch:

  • 931914a: 8340631: assert(reserved_rgn->contain_region(base_addr, size)) failed: Reserved CDS region should contain this mapping region
  • 665c39c: 8347375: Extra

    tag in robot specification

  • b335ea9: 8347122: Add missing @serial tags to module java.desktop
  • df28cec: 8345144: Robot does not specify all causes of IllegalThreadStateException
  • 9f3c5f9: 8344907: NullPointerException in Win32ShellFolder2.getSystemIcon when "icon" is null
  • 22f70a7: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image
  • 3bfa952: 8283795: Add TLSv1.3 and CNSA 1.0 algorithms to implementation requirements
  • 1ef77cd: 8347171: (dc) java/nio/channels/DatagramChannel/InterruptibleOrNot.java fails with virtual thread factory
  • 72f1114: 8346705: SNI not sent with Java 22+ using java.net.http.HttpClient.Builder#sslParameters
  • cb9a98b: 8347141: Several javac tests compile with an unnecessary -Xlint:-path flag
  • ... and 34 more: https://git.openjdk.org/jdk/compare/98724219a87c1cdb1e7942ade1a4d49b201a0a94...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 Jan 8, 2025
@openjdk
Copy link

openjdk bot commented Jan 8, 2025

@shipilev 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 hotspot-gc-dev@openjdk.org label Jan 8, 2025
@mlbridge
Copy link

mlbridge bot commented Jan 8, 2025

Webrevs

Copy link
Contributor

@tschatzl tschatzl left a comment

Choose a reason for hiding this comment

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

lgtm.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 8, 2025
@shipilev
Copy link
Member Author

shipilev commented Jan 9, 2025

Thank you @tschatzl! I think I need another Review to merge this. Thanks!

@shipilev
Copy link
Member Author

Thanks!

/integrate

@openjdk
Copy link

openjdk bot commented Jan 10, 2025

Going to push as commit 1a0fe49.
Since your change was applied there have been 49 commits pushed to the master branch:

  • 8b07617: 8347345: Remove redundant test policy file from ModelMBeanInfoSupport directory
  • f6492aa: 8347279: Problemlist TestEvilSyncBug.java#generational
  • 0210a63: 8347379: Problem list failed tests after JDK-8321413
  • a9351df: 8346787: Fix two C2 IR matching tests for RISC-V
  • 89ee1a5: 8343978: Update the default value of CodeEntryAlignment for Ampere-1A and 1B
  • 931914a: 8340631: assert(reserved_rgn->contain_region(base_addr, size)) failed: Reserved CDS region should contain this mapping region
  • 665c39c: 8347375: Extra

    tag in robot specification

  • b335ea9: 8347122: Add missing @serial tags to module java.desktop
  • df28cec: 8345144: Robot does not specify all causes of IllegalThreadStateException
  • 9f3c5f9: 8344907: NullPointerException in Win32ShellFolder2.getSystemIcon when "icon" is null
  • ... and 39 more: https://git.openjdk.org/jdk/compare/98724219a87c1cdb1e7942ade1a4d49b201a0a94...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 10, 2025

@shipilev Pushed as commit 1a0fe49.

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

@shipilev shipilev deleted the JDK-8347256-epsilon-demote-warnings branch January 10, 2025 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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