Skip to content
Permalink
Browse files
Temporarily fix to disable enumerateVThreads and now block VIRTUAL_TH…
…READ_START event
  • Loading branch information
AlanBateman committed Mar 19, 2021
1 parent 5298020 commit 48cfaf20b8469c4e29d95839ec6d86893666f6d5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
@@ -2348,7 +2348,7 @@ jvmtiEnv *jvmti;
</function>

<function id="ResumeAllVirtualThreads" num="119" since="16">
<synopsis>Suspend All Virtual Threads</synopsis>
<synopsis>Resume All Virtual Threads</synopsis>
<description>
Resume all virtual threads except those already resumed.
Virtual threads may be suspended with
@@ -99,7 +99,8 @@ children(PacketInputStream *in, PacketOutputStream *out)
return JNI_TRUE;
}

is_vthread_group = isSameObject(env, group, gdata->vthreadThreadGroup);
//is_vthread_group = isSameObject(env, group, gdata->vthreadThreadGroup);
is_vthread_group = JNI_FALSE;

WITH_LOCAL_REFS(env, 2) {

@@ -1028,7 +1028,7 @@ parseOptions(char *options)
/* Set vthread debugging level. */
gdata->vthreadsSupported = JNI_TRUE;
gdata->trackAllVThreads = JNI_FALSE;
gdata->enumerateVThreads = JNI_TRUE;
gdata->enumerateVThreads = JNI_FALSE;
gdata->fakeVThreadStartEvent = JNI_TRUE;

/* Options being NULL will end up being an error. */
@@ -1456,9 +1456,9 @@ cbVThreadStart(jvmtiEnv *jvmti_env, JNIEnv *env, jthread vthread)
}

/* Ignore VIRTUAL_THREAD_START events unless we are notifying the debugger of all vthreads. */
if (!gdata->trackAllVThreads || !gdata->enumerateVThreads) {
return;
}
// if (!gdata->trackAllVThreads || !gdata->enumerateVThreads) {
// return;
// }

BEGIN_CALLBACK() {
(void)memset(&info,0,sizeof(info));

0 comments on commit 48cfaf2

Please sign in to comment.