RFR: 8369622: GlobalChunkPoolMutex needs to be recursive [v2]

Zhengyu Gu zgu at openjdk.org
Thu Oct 16 08:08:21 UTC 2025


On Thu, 16 Oct 2025 07:17:23 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> src/hotspot/share/memory/arena.cpp line 54:
>> 
>>> 52: 
>>> 53:   void lock() {
>>> 54:     intx current = os::current_thread_id();
>> 
>> So this is okay but not Thread::current() ?
>
> Yes this becomes e.g. `pthread_self()`

I think it also prevents from the scenarios that having `nullptr` current thread from the first call, then current thread becomes not `nullptr` in subsequent recursive calls.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27759#discussion_r2434966560


More information about the hotspot-runtime-dev mailing list