RFR: 8308745: ObjArrayKlass::allocate_objArray_klass may call into java while holding a lock
Dean Long
dlong at openjdk.org
Wed Mar 6 23:11:55 UTC 2024
On Tue, 6 Feb 2024 22:59:04 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> This change creates a new sort of native recursive lock that can be held during JNI and Java calls, which can be used for synchronization while creating objArrayKlasses at runtime.
>
> Passes tier1-7.
OK, that makes sense about loom and JOM.
src/hotspot/share/runtime/mutex.cpp line 537:
> 535: // can be called by jvmti by VMThread.
> 536: if (current->is_Java_thread()) {
> 537: _sem.wait_with_safepoint_check(JavaThread::cast(current));
Why not use PlatformMutex + OSThreadWaitState instead of a semaphore?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17739#issuecomment-1982008253
PR Review Comment: https://git.openjdk.org/jdk/pull/17739#discussion_r1515269443
More information about the hotspot-dev
mailing list