[jdk17u-dev] RFR: 8293114: JVM should trim the native heap [v4]

Martin Doerr mdoerr at openjdk.org
Wed Aug 16 12:54:20 UTC 2023


On Mon, 14 Aug 2023 08:50:30 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Unclean backport to get useful experimental feature to LTS users.
>> 
>> In addition to usual contextual differences, there is a number of differences against upstream version:
>>  - `synchronizer.cpp` hunks are different, since we do not have [JDK-8256302](https://github.com/openjdk/jdk/commit/6402004852ccc993bb6e879c49fb71e2afdcdfbe) in JDK 17
>>  - `NativeHeapTrimmer_lock` changed from `Mutex::safepoint` to `Mutex::leaf`, since [JDK-8273915](https://github.com/openjdk/jdk/commit/111d5e1a9324cb5e8d98627f6329d17fcbc9c13d) renamed it after JDK 17
>>  - `NativeHeapTrimmer_lock` should also allow VMThread block and never require safepoint checks; this was simplified by [JDK-8274004](https://bugs.openjdk.org/browse/JDK-8274004) later
>>  - `vmError.cpp` code was rewritten in JDK 17 style
>>  - gtest uses `EXPECT_NOT_NULL`, only brought by [JDK-8295865](https://github.com/openjdk/jdk/commit/657a0b2f1564e1754dbd64b776c53a52c480c901#diff-35b3b4703decd15bfd2fc614d431e909727a6cf4d399cf05c7a12466e61ab8a0R58-R59) -- I rewrote them to EXPECT_NE/EQ.
>> 
>> Additional testing:
>>  - [x] Linux x86_64 fastdebug, trim tests
>>  - [x] Linux x86_64 fastdebug, `tier1`
>>  - [x] Linux x86_64 fastdebug, `tier2`
>>  - [x] Linux x86_64 fastdebug, `tier3`
>
> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
> 
>  - Merge branch 'master' into JDK-8293114-trim-native
>  - More adjustments
>  - Adjustments
>  - Backport 9e4fc568a6f1a93c84a84d6cc5220c6eb4e546a5

The backport looks good, but the test has issues in head as well. Thanks, Thomas, for investigating!

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

PR Comment: https://git.openjdk.org/jdk17u-dev/pull/1616#issuecomment-1680547301


More information about the jdk-updates-dev mailing list