RFR: 8323900: Avoid calling os::init_random() in CDS static dump
Ashutosh Mehra
asmehra at openjdk.org
Thu Apr 11 14:52:41 UTC 2024
On Wed, 10 Apr 2024 16:31:08 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> The purpose of the PR is to avoid modifying the global JVM state while dumping the CDS archive.
>
> When updating the identity hashcode for archived Symbols, call `ArchiveBuilder::current()->entropy()` instead of `os::random()`. As a result, CDS no longer needs to call `os::init_random()` with a deterministic seed.
src/hotspot/share/cds/archiveBuilder.hpp line 215:
> 213: GrowableArray<Klass*>* _klasses;
> 214: GrowableArray<Symbol*>* _symbols;
> 215: unsigned int _entropy_seed;
Shouldn't it be a static const?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18728#discussion_r1561160618
More information about the hotspot-dev
mailing list