RFR: 8311248: Refactor CodeCache::initialize_heaps to simplify adding new CodeCache segments
Boris Ulasevich
bulasevich at openjdk.org
Thu Jan 4 11:02:33 UTC 2024
The change simplifies the CodeCache::initialize_heaps segment memory split logic to make it easier to add new segments to the code cache:
if (!non_nmethod_set && !profiled_set && !non_profiled_set) {
...
} else if (!non_nmethod_set || !profiled_set || !non_profiled_set) {
if (non_profiled_set) {
if (!profiled_set) {
...
}
} else if (profiled_set) {
...
} else if (non_nmethod_set) {
...
}
}
The existing layout is retained. With this change, PrintFlagsFinal always shows the actual segment sizes (not an intermediate value before alignment), and the segments always completely fill the ReservedCodeCacheSize (no wasted page due to final down alignment).
-------------
Commit messages:
- test update
- cleanup2
- cleanup1
- 8311248: Refactor CodeCache::initialize_heaps to simplify adding new CodeCache segments
Changes: https://git.openjdk.org/jdk/pull/17244/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17244&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8311248
Stats: 361 lines in 5 files changed: 213 ins; 103 del; 45 mod
Patch: https://git.openjdk.org/jdk/pull/17244.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17244/head:pull/17244
PR: https://git.openjdk.org/jdk/pull/17244
More information about the hotspot-dev
mailing list