RFR: 8309240: Array classes should be stored in dynamic CDS archive [v3]

David Holmes dholmes at openjdk.org
Thu Jul 27 23:18:39 UTC 2023


On Thu, 27 Jul 2023 23:03:16 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> I don't know if this code is run at a safepoint, but because of this bug https://bugs.openjdk.org/browse/JDK-8308745, we can't use a lock to allocate objArrayKlass, so we'll likely need the matching acquire when we fix that.
>
> The code in question is being called during VM startup.
> 
> DynamicArchive::setup_array_klasses() : void
> 	MetaspaceShared::initialize_shared_spaces() : void
> 		universe_init() : jint
> 			init_globals() : jint
> 				Threads::create_vm(JavaVMInitArgs *, bool *) : jint
> 					JNI_CreateJavaVM_inner(JavaVM * *, void * *, void *) : jint
> 						JNI_CreateJavaVM(JavaVM * *, void * *, void *) : jint
> 
> Maybe it is safe not to use the "release_" version for setting `array_klasses`?

The VM is still single-threaded at that point so no "release" is necessary in this code.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14959#discussion_r1276919054


More information about the hotspot-runtime-dev mailing list