RFR: JDK-8312018: Improve reservation of class space and CDS

Thomas Stuefe stuefe at openjdk.org
Fri Aug 11 05:24:28 UTC 2023


On Fri, 11 Aug 2023 04:34:43 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> Some preliminary comments.
> 
> * I am not sure what "CDS" means in the PR title. It seems like CDS doesn't (yet) benefit from the improvements.

CDS uses the new API when reserving memory for the (by default now) relocated archive. So, while it not yet benefits from zero-based encoding, it benefits from the improved entropy the API gives. The old variant was using a randomized start position into an ordered list of 31+7 = 38 value points. The new API gives you entropy based solely on the alignment requirement for metaspace (16M). For unscaled, we have 255 possible attach points, for zero-based 1792.

> src/hotspot/share/runtime/globals.hpp line 1422:
> 
>> 1420:           "fails VM initialization (requires -Xshare=off.")                 \
>> 1421:                                                                             \
>> 1422:   develop(bool, RandomizeClassSpaceLocation, true,                          \
> 
> It's better to make this a diagnostic option for trouble-shooting product builds.

Okay.

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

PR Comment: https://git.openjdk.org/jdk/pull/15041#issuecomment-1674218577
PR Review Comment: https://git.openjdk.org/jdk/pull/15041#discussion_r1290899870


More information about the hotspot-runtime-dev mailing list