RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v9]
Patricio Chilano Mateo
pchilanomate at openjdk.org
Fri Oct 25 21:33:24 UTC 2024
On Fri, 25 Oct 2024 05:17:51 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Patricio Chilano Mateo has updated the pull request incrementally with four additional commits since the last revision:
>>
>> - Rename set/has_owner_anonymous to set/has_anonymous_owner
>> - Fix comments in javaThread.hpp and Thread.java
>> - Rename nonce/nounce to seqNo in VirtualThread class
>> - Remove ObjectMonitor::set_owner_from_BasicLock()
>
> src/hotspot/share/runtime/objectMonitor.cpp line 1673:
>
>> 1671:
>> 1672: ContinuationEntry* ce = current->last_continuation();
>> 1673: if (interruptible && ce != nullptr && ce->is_virtual_thread()) {
>
> So IIUC this use of `interruptible` would be explained as follows:
>
> // Some calls to wait() occur in contexts that still have to pin a vthread to its carrier.
> // All such contexts perform non-interruptible waits, so by checking `interruptible` we know
> // this is a regular Object.wait call.
Yes, although the non-interruptible call is coming from ObjectLocker, which already has the NoPreemptMark, so I removed this check.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1817388840
More information about the serviceability-dev
mailing list