RFR: 8369622: GlobalChunkPoolMutex needs to be recursive [v2]
Johan Sjölen
jsjolen at openjdk.org
Thu Oct 16 07:55:06 UTC 2025
On Wed, 15 Oct 2025 21:48:25 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> RecursiveMutex has safepoint interactions only if the current thread is a JavaThread. It could be modified to have a no-owner sentinel and maybe use os::current_thread() like this equivalent one does.
>>
>> With this deferred static mechanism, I think it can allocate the semaphore which might not be allowed to be allocated with static linkage.
>>
>> This code is almost a copy of that.
>
> I tried making RecursiveLock a template but it's sort of a pain.
It is basically a copy. The reason I went the longer (lines of code-wise) is because I'd prefer it if we didn't spread this implementation around, so having this handmade one in `arena.cpp` seems like an acceptable trade-off to having the RecursiveLock being templated and so on.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27759#discussion_r2434930029
More information about the hotspot-runtime-dev
mailing list