RFR: 8369622: GlobalChunkPoolMutex needs to be recursive
David Holmes
dholmes at openjdk.org
Tue Oct 14 05:14:11 UTC 2025
On Mon, 13 Oct 2025 18:14:56 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
>> src/hotspot/share/memory/arena.cpp line 55:
>>
>>> 53: PlatformMutex::lock();
>>> 54: _owner = t;
>>> 55: }
>>
>> As per the comment:
>>
>> // For many calls, the current thread has not
>> // been created so we cannot use Mutex.
>>
>> this ownership test won't allow for recursive use in those circumstances. So we have slightly odd semantics here that the mutex is recursive for attached threads but not for un-attached. For this specialised usecase maybe we can tolerate that.
>
> I don't see how it can work without recursion count ...
Doh! Yep Zhengyu is right.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27759#discussion_r2427927714
More information about the hotspot-runtime-dev
mailing list