RFR: 8263377: Store method handle linkers in the 'non-nmethods' heap [v3]

Jorn Vernee jvernee at openjdk.org
Tue Jun 28 19:44:28 UTC 2022


On Tue, 28 Jun 2022 16:38:20 GMT, Yi-Fan Tsai <duke at openjdk.org> wrote:

>> src/hotspot/share/code/codeBlob.cpp line 347:
>> 
>>> 345:   {
>>> 346:     MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
>>> 347:     int mhi_size = CodeBlob::allocation_size(code_buffer, sizeof(MethodHandleIntrinsicBlob));
>> 
>> The allocation size could also be computed before taking the code cache lock. BufferBlob also does this for example, but others don't. I think it makes sense to have it outside of the mutex block though, to minimize the time we need to hold the lock. I don't see anything in there that seems to require the lock. (Maybe we should clean up other cases in a followup as well).
>
> The issue was [filed](https://bugs.openjdk.org/browse/JDK-8289071) and [fixed](https://github.com/openjdk/jdk/pull/9266).

Thanks!

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

PR: https://git.openjdk.org/jdk/pull/8760


More information about the hotspot-compiler-dev mailing list