On Tue, 9 Apr 2024 01:19:18 GMT, Leonid Mesnik <[email protected]> wrote:
>> The internal JVM TI `JvmtiHandshake` and `JvmtiUnitedHandshakeClosure`
>> classes were introduced in the JDK 22 to unify/simplify the JVM TI functions
>> supporting implementation of the virtual threads. This enhancement is to
>> refactor JVM TI functions `PopFrame` and `ForceEarlyReturn` on the base of
>> `JvmtiHandshake` and `JvmtiUnitedHandshakeClosure` classes.
>>
>> Testing:
>>
>> Ran mach5 tiers 1-6
>
> src/hotspot/share/prims/jvmtiEnvBase.hpp line 508:
>
>> 506: }
>> 507: void do_vthread(Handle target_h) {
>> 508: assert(_target_jt != nullptr, "sanity check");
>
> Better to test that target_h is same as _target_jt.
Thanks.
The `_target_jt` is a `JavaThread*` while the `target_h` is a handle of thread
oop.
Added the following assert: `assert(_target_jt->vthread() == target_h(),
"sanity check");`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18570#discussion_r1558372501