RFR: JDK-8312018: Improve zero-base-optimized reservation of class space [v4]

Thomas Stuefe stuefe at openjdk.org
Fri Jul 21 05:51:57 UTC 2023


On Tue, 18 Jul 2023 19:43:26 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Thomas Stuefe 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 five additional commits since the last revision:
>> 
>>  - Feedback David
>>  - Merge branch 'master' into JDK-8312018-Improve-zero-base-optimized-reservation-of-class-space
>>  - Fix Windows
>>  - Feedback Roman; fix off-by-1; fix tracing
>>  - better zero-based reservation strategy
>
> src/hotspot/share/memory/metaspace.cpp line 597:
> 
>> 595:   {
>> 596:     // First try for zero-base zero-shift (lower 4G); failing that, try for zero-based with max shift (lower 32G)
>> 597:     constexpr int num_tries = 8;
> 
> num_tries should be computed instead of hard-coded.

Why? In pre-existing code that does similar things, we always hardcode them implicitly (typically by attempt-mapping from A->B in hardcoded stride C). And how would I calculate it?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14867#discussion_r1270249352


More information about the hotspot-dev mailing list