RFR: 8306767: Concurrent repacking of extra data in MethodData is potentially unsafe [v16]

Emanuel Peter epeter at openjdk.org
Mon Jan 15 12:35:59 UTC 2024


On Thu, 11 Jan 2024 13:41:11 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fixed typo
>
> src/hotspot/share/ci/ciMethodData.cpp line 135:
> 
>> 133: 
>> 134:   // Lock to read ProfileData, and ensure lock is not unintentionally broken by a safepoint
>> 135:   MutexLocker ml(mdo->extra_data_lock(), Mutex::_no_safepoint_check_flag);
> 
> Is there anyway to have MutexLocker take care of verifying that the there's no safepoint? It would be nice to replace:
> 
> 
> MutexLocker ml();
> NoSafepointVerifier no_safepoint;
> 
> 
> by: 
> 
> 
> MutexLocker ml();
> 
> 
> only.

@rwestrel I introduced a `NoSafepointMutexLocker`, which is composed of both a `ConditionalMutexLocker` and a `NoSafepointVerifier`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16840#discussion_r1452318640


More information about the hotspot-dev mailing list