RFR: JDK-8325496: Make TrimNativeHeapInterval a product switch

David Holmes dholmes at openjdk.org
Tue Feb 13 06:42:03 UTC 2024


On Sat, 10 Feb 2024 09:57:56 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> [JDK-8293114](https://bugs.openjdk.org/browse/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.

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 line 1463:

> 1461: .RE
> 1462: .TP
> 1463: \f[V]-XX:TrimNativeHeapInterval\f[R]

Suggestion:

\f[V]-XX:TrimNativeHeapInterval=\f[R]\f[I]millis\f[R]

src/java.base/share/man/java.1 line 1466:

> 1464: Interval, in ms, at which the JVM will trim the native heap. Lower values
> 1465: will reclaim memory more eagerly at the cost of higher overhead. A value
> 1466: of 0 (default) disables native heap trimming.

Should we add:

Native heap trimming is performed in a dedicated thread.

so people understand the potential cost of enabling this a little better?

src/java.base/share/man/java.1 line 1469:

> 1467: .RS
> 1468: .PP
> 1469: This option is only supported on Linux with glibc.

Suggestion: s/glibc/GNU C Library (glibc)/

-------------

PR Review: https://git.openjdk.org/jdk/pull/17799#pullrequestreview-1876960475
PR Review Comment: https://git.openjdk.org/jdk/pull/17799#discussion_r1487276522
PR Review Comment: https://git.openjdk.org/jdk/pull/17799#discussion_r1487270921
PR Review Comment: https://git.openjdk.org/jdk/pull/17799#discussion_r1487272938


More information about the hotspot-runtime-dev mailing list