RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning
Coleen Phillimore
coleenp at openjdk.org
Wed Nov 6 17:40:09 UTC 2024
On Fri, 25 Oct 2024 13:12:11 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
>> src/hotspot/share/runtime/continuationFreezeThaw.cpp line 1275:
>>
>>> 1273:
>>> 1274: if (caller.is_interpreted_frame()) {
>>> 1275: _total_align_size += frame::align_wiggle;
>>
>> Please put a comment here about frame align-wiggle.
>
> I removed this case since it can never happen. The caller has to be compiled, and we assert that at the beginning. This was a leftover from the forceful preemption at a safepoint work. I removed the similar code in recurse_thaw_stub_frame. I added a comment for the compiled and native cases though.
ok that's helpful.
>> src/hotspot/share/runtime/continuationFreezeThaw.cpp line 1550:
>>
>>> 1548: assert(!cont.is_empty(), "");
>>> 1549: // This is done for the sake of the enterSpecial frame
>>> 1550: StackWatermarkSet::after_unwind(thread);
>>
>> Is there a new place for this StackWatermark code?
>
> I removed it. We have already processed the enterSpecial frame as part of flush_stack_processing(), in fact we processed up to the caller of `Continuation.run()`.
Okay, good!
>> src/hotspot/share/runtime/objectMonitor.hpp line 43:
>>
>>> 41: // ParkEvent instead. Beware, however, that the JVMTI code
>>> 42: // knows about ObjectWaiters, so we'll have to reconcile that code.
>>> 43: // See next_waiter(), first_waiter(), etc.
>>
>> Also a nice cleanup. Did you reconcile the JVMTI code?
>
> We didn't remove the ObjectWaiter. As for the presence of virtual threads in the list, we skip them in JVMTI get_object_monitor_usage. We already degraded virtual thread support for GetObjectMonitorUsage.
Ok, good that there isn't a jvmti special case here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1819860241
PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1819860643
PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1819864520
More information about the core-libs-dev
mailing list