RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning
Coleen Phillimore
coleenp at openjdk.org
Wed Nov 6 17:40:11 UTC 2024
On Wed, 23 Oct 2024 20:42:44 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
>> src/hotspot/share/runtime/objectMonitor.hpp line 299:
>>
>>> 297: // Simply set _owner field to new_value; current value must match old_value.
>>> 298: void set_owner_from_raw(int64_t old_value, int64_t new_value);
>>> 299: // Same as above but uses tid of current as new value.
>>
>> By `tid` here (and elsewhere) you actually mean `thread->threadObj()->thread_id()` - right?
>
> It is `thread->vthread()->thread_id()` but it will match `thread->threadObj()->thread_id()` when there is no virtual thread mounted. But we cache it in thread->_lockd_id so we retrieve it from there. I think we should probably change the name of _lock_id.
but we can't change it there to thread_id because then it would be too confusing. Since it's used for locking, lock_id seems like a good name.
>> src/hotspot/share/runtime/objectMonitor.hpp line 315:
>>
>>> 313: void set_succesor(oop vthread);
>>> 314: void clear_succesor();
>>> 315: bool has_succesor();
>>
>> Sorry but `successor` has two `s` before `or`.
>
> Fixed.
Yes, need to fix successor spelling.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1817420867
PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1811616558
More information about the core-libs-dev
mailing list