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

Aleksey Shipilev shade at openjdk.org
Tue Jul 25 14:25:37 UTC 2023


> 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 pull request now contains three commits:

 - More adjustments
 - Adjustments
 - Backport 9e4fc568a6f1a93c84a84d6cc5220c6eb4e546a5

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

Changes: https://git.openjdk.org/jdk17u-dev/pull/1616/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=1616&range=02
  Stats: 847 lines in 20 files changed: 840 ins; 0 del; 7 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/1616.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/1616/head:pull/1616

PR: https://git.openjdk.org/jdk17u-dev/pull/1616


More information about the jdk-updates-dev mailing list