RFR: 8323900: Avoid calling os::init_random() in CDS static dump
Thomas Stuefe
stuefe at openjdk.org
Thu Apr 11 15:03:46 UTC 2024
On Thu, 11 Apr 2024 14:50:28 GMT, Ashutosh Mehra <asmehra 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?
I think it is meant to be a member of the (one and only existing) archive builder.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18728#discussion_r1561181874
More information about the hotspot-dev
mailing list