On Tue, 30 Sep 2025 15:38:49 GMT, Leonid Mesnik <[email protected]> wrote:
> Right now I am not sure if CSR is needed. The new behaviour doesn't require
> specification changes.
Significant behavioural changes also require a CSR request - not just changes
to specifications.
>> src/hotspot/share/prims/jvmtiEventController.cpp line 1060:
>>
>>> 1058: void
>>> 1059: JvmtiEventControllerPrivate::vm_death() {
>>> 1060: _execution_finished = true;
>>
>> Unless there is some lock guarding this that I cannot see in this diff, if
>> you want to ensure this will be seen as soon as possible then you need a
>> `store_fence` (and the variable should be `volatile` - and will be a
>> candidate for `Atomic<T>`). You are still racing with others threads but
>> this would at least attempt to minimise the window.
>
> I forgot to put this in description and mentioned the first comment.
> The access to variable is protected with JvmtiThreadState_lock.
> Am I understand correctly, that it is enough to correctly synchronize it?
Yes - if all accesses are done under the lock that is fine. Thanks
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27504#issuecomment-3355863717
PR Review Comment: https://git.openjdk.org/jdk/pull/27504#discussion_r2394227874