RFR: 8249880 - JVMCI calling register_nmethod without CodeCache lock

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed Jul 22 17:40:18 UTC 2020


+1

Thanks,
Vladimir

On 7/22/20 8:12 AM, Erik Österlund wrote:
> Hi Bob,
> 
> Looks good.
> 
> Thanks,
> /Erik
> 
> On 2020-07-22 17:07, Bob Vandette wrote:
>> Please review this fix which adds a CodeCache lock around registering an nmethod with
>> the collector.   This is causing a guarantee to fire when the nmethod sweeper runs during
>> a CompileTheWorld test.
>>
>> BUG:
>> https://bugs.openjdk.java.net/browse/JDK-8249880
>>
>> PATCH:
>>
>> diff --git a/src/hotspot/share/jvmci/jvmciRuntime.cpp b/src/hotspot/share/jvmci/jvmciRuntime.cpp
>> --- a/src/hotspot/share/jvmci/jvmciRuntime.cpp
>> +++ b/src/hotspot/share/jvmci/jvmciRuntime.cpp
>> @@ -668,6 +668,7 @@
>>     // Since we've patched some oops in the nmethod,
>>     // (re)register it with the heap.
>> + MutexLocker ml(CodeCache_lock, Mutex::_no_safepoint_check_flag);
>>     Universe::heap()->register_nmethod(nm);
>>   }
>>
>> Bob.
>>
> 


More information about the hotspot-compiler-dev mailing list