Skip to content

Commit be9d178

Browse files
committed
rename virtualThreadStartEventsPermanentlyEnabled to virtualThreadStartEventsEnabledForDeferredEventMode
1 parent e0a241a commit be9d178

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ parseOptions(char *options)
989989
gdata->includeVThreads = JNI_FALSE;
990990
gdata->rememberVThreadsWhenDisconnected = JNI_FALSE;
991991

992-
gdata->virtualThreadStartEventsPermanentlyEnabled = JNI_FALSE;
992+
gdata->virtualThreadStartEventsEnabledForDeferredEventMode = JNI_FALSE;
993993

994994
gdata->jvmti_data_dump = JNI_FALSE;
995995

src/jdk.jdwp.agent/share/native/libjdwp/eventFilter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ enableEvents(HandlerNode *node)
13221322
// JVMTI_EVENT_VIRTUAL_THREAD_START/END are already always enabled.
13231323
return JVMTI_ERROR_NONE;
13241324
}
1325-
if (ei == EI_THREAD_START && gdata->virtualThreadStartEventsPermanentlyEnabled) {
1325+
if (ei == EI_THREAD_START && gdata->virtualThreadStartEventsEnabledForDeferredEventMode) {
13261326
// JVMTI_EVENT_VIRTUAL_THREAD_START is already permanently enabled.
13271327
return JVMTI_ERROR_NONE;
13281328
}
@@ -1414,7 +1414,7 @@ disableEvents(HandlerNode *node)
14141414
// JVMTI_EVENT_VIRTUAL_THREAD_START/END are already enabled and stay enabled.
14151415
return JVMTI_ERROR_NONE;
14161416
}
1417-
if (ei == EI_THREAD_START && gdata->virtualThreadStartEventsPermanentlyEnabled) {
1417+
if (ei == EI_THREAD_START && gdata->virtualThreadStartEventsEnabledForDeferredEventMode) {
14181418
// JVMTI_EVENT_VIRTUAL_THREAD_START is already permanently enabled.
14191419
return JVMTI_ERROR_NONE;
14201420
}

src/jdk.jdwp.agent/share/native/libjdwp/eventHandler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,14 +1688,14 @@ eventHandler_reset(jbyte sessionID)
16881688
/* We also want to disable VIRTUAL_THREAD_START events if they were enabled due to
16891689
* a deferred event request.
16901690
*/
1691-
if (gdata->virtualThreadStartEventsPermanentlyEnabled) {
1691+
if (gdata->virtualThreadStartEventsEnabledForDeferredEventMode) {
16921692
jvmtiError error;
16931693
error = threadControl_setEventMode(JVMTI_DISABLE,
16941694
EI_VIRTUAL_THREAD_START, NULL);
16951695
if (adjust_jvmti_error(error) != JVMTI_ERROR_NONE) {
16961696
EXIT_ERROR(error,"Can't disable vthread start events");
16971697
}
1698-
gdata->virtualThreadStartEventsPermanentlyEnabled = JNI_FALSE;
1698+
gdata->virtualThreadStartEventsEnabledForDeferredEventMode = JNI_FALSE;
16991699
}
17001700

17011701
/* Reset the event helper thread, purging all queued and

src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,13 +762,13 @@ addDeferredEventMode(JNIEnv *env, jvmtiEventMode mode, EventIndex ei, jthread th
762762
* make sure that there are no event handlers (event requests) for THREAD_START
763763
* events that do not have the PlatformThreadsFilter enabled.
764764
*/
765-
if (!gdata->includeVThreads && !gdata->virtualThreadStartEventsPermanentlyEnabled && isVThread(thread)) {
765+
if (!gdata->includeVThreads && !gdata->virtualThreadStartEventsEnabledForDeferredEventMode && isVThread(thread)) {
766766
jvmtiError error = JVMTI_FUNC_PTR(gdata->jvmti,SetEventNotificationMode)
767767
(gdata->jvmti, JVMTI_ENABLE, JVMTI_EVENT_VIRTUAL_THREAD_START, NULL);
768768
if (error != JVMTI_ERROR_NONE) {
769769
EXIT_ERROR(error, "cannot enable JVMTI_EVENT_VIRTUAL_THREAD_START");
770770
}
771-
gdata->virtualThreadStartEventsPermanentlyEnabled = JNI_TRUE;
771+
gdata->virtualThreadStartEventsEnabledForDeferredEventMode = JNI_TRUE;
772772
}
773773

774774
return JVMTI_ERROR_NONE;

src/jdk.jdwp.agent/share/native/libjdwp/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ typedef struct {
8787
jboolean vthreadsSupported; /* If true, debugging support for vthreads is enabled. */
8888
jboolean includeVThreads; /* If true, VM.AllThreads includes vthreads. */
8989
jboolean rememberVThreadsWhenDisconnected;
90-
jboolean virtualThreadStartEventsPermanentlyEnabled;
90+
jboolean virtualThreadStartEventsEnabledForDeferredEventMode;
9191
jboolean doerrorexit;
9292
jboolean modifiedUtf8;
9393
jboolean quiet;

0 commit comments

Comments
 (0)