RFR: 8323900: Avoid calling os::init_random() in CDS static dump
Thomas Stuefe
stuefe at openjdk.org
Thu Apr 11 15:03:45 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.
Thinking about this, since global entropy (archived object ihashes) sneak into archives whether we use local seeds or not, maybe we should not bother with such a patch.
In other words, if global state affects the archive anyway, we may just as well roll with it.
See https://github.com/openjdk/jdk/pull/18735
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18728#issuecomment-2049897850
More information about the hotspot-dev
mailing list