On Wed, 23 Oct 2024 09:53:53 GMT, Richard Reingruber <rr...@openjdk.org> wrote:

>> Patricio Chilano Mateo has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Address David's comments to ObjectMonitor.hpp
>
> src/hotspot/share/runtime/javaThread.hpp line 166:
> 
>> 164:   // current _vthread object, except during creation of the primordial 
>> and JNI
>> 165:   // attached thread cases where this field can have a temporary value.
>> 166:   int64_t _lock_id;
> 
> Following the review I wanted to better understand when `_lock_id` changes. 
> There seems to be another exception to the rule that `_lock_id` is equal to 
> the `tid` of the current `_vthread`. I think they won't be equal when 
> switching temporarily from the virtual to the carrier thread in 
> `VirtualThread::switchToCarrierThread()`.

Right, and we hope this temporary. We had more use of temporary transitions 
when the feature was initially added in JDK 19, now we mostly down to the 
nested parking issue. That will go away when we get to replacing the timer 
code, and we should be able to remove the switchXXX method and avoid the 
distraction/complexity that goes with them.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1812385061

Reply via email to