RFR: 8308745: ObjArrayKlass::allocate_objArray_klass may call into java while holding a lock [v3]

David Holmes dholmes at openjdk.org
Fri Mar 8 06:19:58 UTC 2024


On Thu, 7 Mar 2024 13:21:09 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.
>
> Coleen Phillimore has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Missed a word.
>  - David's comment fixes.

Marked as reviewed by dholmes (Reviewer).

src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp line 121:

> 119:   {
> 120:     // To get a consistent list of classes we need MultiArray_lock to ensure
> 121:     // array classes aren't created by another thread during this walk. This walks through the

Thanks for clarifying, though I'm not sure why would care given the set of classes could have changed by the time we return them anyway.

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

PR Review: https://git.openjdk.org/jdk/pull/17739#pullrequestreview-1924097971
PR Review Comment: https://git.openjdk.org/jdk/pull/17739#discussion_r1517209655


More information about the hotspot-dev mailing list