[jdk11u-dev] RFR: 8268893: jcmd to trim the glibc heap

Thomas Stuefe stuefe at openjdk.org
Wed Sep 7 13:30:55 UTC 2022


On Fri, 2 Sep 2022 18:30:11 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Backport the System.trim_native_heap command to 11.
> 
> This needs a CSR backport, which exists, it was approved for 11 ages ago (https://bugs.openjdk.org/browse/JDK-8273602) but then the actual backport fell under the table.
> 
> The downport is not clean. Since [8282382](https://bugs.openjdk.org/browse/JDK-8282382) had been downported selectively, which introduced `print_glibc_malloc_tunables` to os_linux.cpp, which sits smack in the middle of the code to change. The hunk affected breaks out the proc-file-reading from the old `os::Linux::print_process_memory_info()` into `os::Linux::query_process_memory_info()` - with this patch, both functions are identical now between jdk11u and later releases even though the diff looks different.
> 
> Patch was tested in GHAs, and I ran manual tests with `jcmd .. System.trim_native_heap`, all works.

Merci!

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

PR: https://git.openjdk.org/jdk11u-dev/pull/1354


More information about the jdk-updates-dev mailing list