RFR: 8328083: degrade virtual thread support for GetObjectMonitorUsage [v4]
Serguei Spitsyn
sspitsyn at openjdk.org
Wed May 15 20:18:04 UTC 2024
On Wed, 15 May 2024 19:52:36 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> review: 1. clarifications in JDWP and JDI spec; 2. clarifications in test comments.
>
> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1583:
>
>> 1581: assert(w != nullptr, "sanity check");
>> 1582: if (java_lang_VirtualThread::is_instance(thread_oop)) {
>> 1583: skipped++;
>
> I don't think maintaining `skipped` does anything here.
Thank you for the question. It is needed at the line 1586 below to discount the index:
if (java_lang_VirtualThread::is_instance(thread_oop)) {
skipped++;
} else {
// If the thread was found on the ObjectWaiter list, then
// it has not been notified.
Handle th(current_thread, get_vthread_or_thread_oop(w));
1586: ret.notify_waiters[i - skipped] = (jthread)jni_reference(calling_thread, th);
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19030#discussion_r1602193077
More information about the serviceability-dev
mailing list