On Fri, 27 Jun 2025 15:44:16 GMT, Chen Liang <li...@openjdk.org> wrote:
>> Andrew Haley has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move THREAD_LOCAL_RANDOM_ACCESS into class Cache.Constants > > src/java.base/share/classes/java/lang/ScopedValue.java line 711: > >> 709: // This method exists only so that we can generate keys early in >> 710: // the boot cycle, before the class j.u.c.ThreadLocalRandom has >> 711: // been initialized. > > I recommend also adding "or System.getProperty is accessible" here. I think > we need to describe in detail how this dependency system works: > > 1. Cache size depends on System.getProperty (Reason for original failure) > 2. Hash depends on ThreadLocalRandom initialization > > So we want to convey that in early boot, we can create SV, but we cannot > bind/query it. No matter what implementation class model we choose, I think > we should document this two-stage initialization process of: > > 1. Early boot, can create SV, cannot use it > 2. 2 dependencies ready, can now bind/query SV. Thanks. Is this better? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26019#discussion_r2175132462