RFR: 8329432: PopFrame and ForceEarlyReturn functions should use JvmtiHandshake
Serguei Spitsyn
sspitsyn at openjdk.org
Tue Apr 9 22:31:10 UTC 2024
On Tue, 9 Apr 2024 01:19:18 GMT, Leonid Mesnik <lmesnik at openjdk.org> 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
More information about the serviceability-dev
mailing list