RFR: 8306767: Concurrent repacking of extra data in MethodData is potentially unsafe [v19]
Emanuel Peter
epeter at openjdk.org
Thu Jan 18 16:13:30 UTC 2024
On Wed, 17 Jan 2024 16:31:38 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> They verify that no safepoints happen while holding the lock. There's a counter in JavaThread.
>>
>>
>> #ifdef ASSERT
>> // Debug support for checking if code allows safepoints or not.
>> // Safepoints in the VM can happen because of allocation, invoking a VM operation, or blocking on
>> // mutex, or blocking on an object synchronizer (Java locking).
>> // If _no_safepoint_count is non-zero, then an assertion failure will happen in any of
>> // the above cases. The class NoSafepointVerifier is used to set this counter.
>> int _no_safepoint_count; // If 0, thread allow a safepoint to happen
>
> I guess the comment should be updated to say we increment this when taking out a no-safepoint-check mutex.
Ok, I removed the `NoSafepointVerifier`. It seems to work, and pass my verification that we are in a no_safepoint scope.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16840#discussion_r1457668982
More information about the hotspot-dev
mailing list