[jdk11u-dev] RFR: 8268893: jcmd to trim the glibc heap
Thomas Stuefe
stuefe at openjdk.org
Sat Sep 3 04:50:40 UTC 2022
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.
-------------
Commit messages:
- Backport 6096dd9765eaf280890f65c0ff1ab64864b9316a
Changes: https://git.openjdk.org/jdk11u-dev/pull/1354/files
Webrev: https://webrevs.openjdk.org/?repo=jdk11u-dev&pr=1354&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8268893
Stats: 267 lines in 6 files changed: 236 ins; 21 del; 10 mod
Patch: https://git.openjdk.org/jdk11u-dev/pull/1354.diff
Fetch: git fetch https://git.openjdk.org/jdk11u-dev pull/1354/head:pull/1354
PR: https://git.openjdk.org/jdk11u-dev/pull/1354
More information about the jdk-updates-dev
mailing list