RFR: 8297286: runtime/vthread tests crashing after JDK-8296324 [v4]

Chris Plummer cjplummer at openjdk.org
Thu Mar 23 02:05:06 UTC 2023


On Wed, 22 Mar 2023 19:06:34 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>> The fix is to enable virtual threads support for late binding JVMTI agents.
>> The fix includes:
>> - New function `JvmtiEnvBase::enable_virtual_threads_notify_jvmti()` which does enabling JVMTI VTMS transition notifications in case of agent loaded into running VM. This function executes a VM operation counting VTMS transition bits in all `JavaThread`'s to correctly set the static counter `_VTMS_transition_count` needed for VTMS transition protocol.
>> - New function `JvmtiEnvBase::disable_virtual_threads_notify_jvmti()` which is needed for testing. It is used by the `WhiteBox` API.
>> - New WhiteBox function `WB_SetVirtualThreadsNotifyJvmtiMode(JNIEnv* env, jobject wb, jboolean enable)` needed for testing of this update.
>> - New regression test: `serviceability/jvmti/vthread/ToggleNotifyJvmtiTest`
>> 
>> Testing:
>> - New test: `serviceability/jvmti/vthread/ToggleNotifyJvmtiTest`
>> - The originally failed tests are expected to pass now:
>>   `runtime/vthread/RedefineClass.java`
>>   `runtime/vthread/TestObjectAllocationSampleEvent.java` 
>> - In progress: Run the tiers 1-6 to make sure there are no regression.
>
> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
> 
>   minor cleanup in enable_virtual_threads_notify_jvmti()

src/hotspot/share/prims/jvmtiEnvBase.hpp line 87:

> 85: 
> 86:   static bool enable_virtual_threads_notify_jvmti();
> 87:   static bool disable_virtual_threads_notify_jvmti();

"disable" only seems to be used by the WB API. Is that expected?

src/hotspot/share/prims/jvmtiThreadState.hpp line 102:

> 100: 
> 101:   static int  VTMS_transition_count()                { return _VTMS_transition_count; }
> 102:   static void set_VTMS_transition_count(bool val)    { _VTMS_transition_count = val; }

Although there is a call to `set_VTMS_transition_count()`, I don't see any calls to `VTMS_transition_count()`. Are these really needed?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13133#discussion_r1145589024
PR Review Comment: https://git.openjdk.org/jdk/pull/13133#discussion_r1145589515


More information about the serviceability-dev mailing list