RFR: 8361912: ThreadsListHandle::cv_internal_thread_to_JavaThread does not deal with a virtual thread's carrier thread [v2]

Serguei Spitsyn sspitsyn at openjdk.org
Sat Jul 26 08:14:56 UTC 2025


On Fri, 25 Jul 2025 17:55:44 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Move comment
>
> src/hotspot/share/prims/jvmtiExport.cpp line 871:
> 
>> 869: //
>> 870: jvmtiError
>> 871: JvmtiExport::cv_oop_to_JavaThread(ThreadsList * t_list, oop thread_oop,
> 
> When did `JvmtiExport::cv_oop_to_JavaThread` become unused?

To support virtual threads the JVMTI is using `JvmtiEnvBase::get_threadOop_and_JavaThread()` which in turn is using the `JvmtiExport::cv_external_thread_to_JavaThread()`. Also, the `JvmtiExport::cv_external_thread_to_JavaThread()` is used directly in some places. When the last usage of `JvmtiExport::cv_oop_to_JavaThread()` become unused I was not sure it is not needed anymore and left it alone.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26287#discussion_r2232788477


More information about the hotspot-dev mailing list