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

JDK-8325496: Make TrimNativeHeapInterval a product switch #17799

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented Feb 10, 2024

JDK-8293114 introduced automatic C-heap trimming, for now supported only by the glibc. It is controlled by the command line switch TrimNativeHeapInterval. The feature has proven very valuable to customers, and all issues have been ironed out. So, I'd like to make this switch a non-experimental product switch.

/csr
/label hotspot-runtime


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Change requires CSR request JDK-8325498 to be approved
  • Commit message must refer to an issue

Issues

  • JDK-8325496: Make TrimNativeHeapInterval a product switch (Enhancement - P4)
  • JDK-8325498: Make TrimNativeHeapInterval a product switch (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17799

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 10, 2024

👋 Welcome back stuefe! 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 csr Pull request needs approved CSR before integration label Feb 10, 2024
@openjdk
Copy link

openjdk bot commented Feb 10, 2024

@tstuefe has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@tstuefe please create a CSR request for issue JDK-8325498 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Feb 10, 2024
@openjdk
Copy link

openjdk bot commented Feb 10, 2024

@tstuefe
The hotspot-runtime label was successfully added.

@tstuefe tstuefe marked this pull request as ready for review February 12, 2024 09:12
@tstuefe
Copy link
Member Author

tstuefe commented Feb 12, 2024

Ping @dholmes-ora

@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 12, 2024
@tstuefe tstuefe changed the title JDK-8325498: Make TrimNativeHeapInterval a product switch JDK-8325496: Make TrimNativeHeapInterval a product switch Feb 12, 2024
@mlbridge
Copy link

mlbridge bot commented Feb 12, 2024

Webrevs

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.

A few suggestions on the manpage entry. Once finalized I will do the update to the markdown sources for you.

Thanks.

src/java.base/share/man/java.1 Outdated Show resolved Hide resolved
src/java.base/share/man/java.1 Outdated Show resolved Hide resolved
src/java.base/share/man/java.1 Outdated Show resolved Hide resolved
@tstuefe
Copy link
Member Author

tstuefe commented Feb 16, 2024

Hi @dholmes-ora, thanks for your review. I massaged in all your feedback.

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.

Looks good. Thanks. I will prepare the update for the manpage sources on Monday.

@tstuefe
Copy link
Member Author

tstuefe commented Feb 16, 2024

Thank you @dholmes-ora !

I'll wait then for the CSR to be approved (I think Joe is still awaiting your okay there) and for a second reviewer.

@dholmes-ora
Copy link
Member

Hi @tstuefe ,
I made the changes to the source markdown and regenerated the troff file and got some minor difference:

 .RE
 .TP
-\f[V]-XX:TrimNativeHeapInterval=\f[R]\f[I]millis\f[R]\f[R]
-Interval, in ms, at which the JVM will trim the native heap. Lower values
-will reclaim memory more eagerly at the cost of higher overhead. A value
-of 0 (default) disables native heap trimming.
+\f[V]-XX:TrimNativeHeapInterval=\f[R]\f[I]millis\f[R]
+Interval, in ms, at which the JVM will trim the native heap.
+Lower values will reclaim memory more eagerly at the cost of higher
+overhead.
+A value of 0 (default) disables native heap trimming.
 Native heap trimming is performed in a dedicated thread.
 .RS
 .PP

Could you adjust your PR accordingly please. Thanks.

@tstuefe
Copy link
Member Author

tstuefe commented Feb 19, 2024

Could you adjust your PR accordingly please. Thanks.

Done. Thank you @dholmes-ora .

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.

Thanks. Sorry can you please update the copyright year too:

-.\" Copyright (c) 1994, 2023, Oracle and/or its affiliates. All rights reserved.
+.\" Copyright (c) 1994, 2024, Oracle and/or its affiliates. All rights reserved.

@tstuefe
Copy link
Member Author

tstuefe commented Feb 20, 2024

Thanks. Sorry can you please update the copyright year too:

-.\" Copyright (c) 1994, 2023, Oracle and/or its affiliates. All rights reserved.
+.\" Copyright (c) 1994, 2024, Oracle and/or its affiliates. All rights reserved.

Done. Sorry for forgetting (now that would be a valuable thing to check for jcheck)

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.

Sorry the Oracle copyrights need a correction.

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023 Red Hat, Inc. All rights reserved.
* Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

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

Needs a comma after 2024

* Copyright (c) 2023 Red Hat, Inc. All rights reserved.
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, 2024 Red Hat, Inc. All rights reserved.
* Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

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

Needs a comma after 2024

@tstuefe
Copy link
Member Author

tstuefe commented Feb 20, 2024

Sorry the Oracle copyrights need a correction.

Oh, sorry. Corrected.

@openjdk
Copy link

openjdk bot commented Feb 20, 2024

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

8325496: Make TrimNativeHeapInterval a product switch

Reviewed-by: dholmes, mbaesken

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

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 ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels Feb 20, 2024
* Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, 2024 Red Hat, Inc. All rights reserved.
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, 2024, Red Hat, Inc. All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

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

Please note the comma remark only applied to Oracle copyright notices. I have no idea what the rules are for Red hat notices.

Copy link
Member Author

Choose a reason for hiding this comment

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

We seem to be doing this too.

@tstuefe
Copy link
Member Author

tstuefe commented Feb 21, 2024

Thanks a lot @dholmes-ora and @MBaesken !

/integrate

@openjdk
Copy link

openjdk bot commented Feb 21, 2024

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

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Feb 21, 2024

@tstuefe Pushed as commit d31fd78.

💡 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-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
3 participants