< prev index next >

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

Print this page
*** 433,10 ***
--- 433,17 ---
              break;
          case EI_THREAD_START:
          case EI_THREAD_END:
              writeThreadEvent(env, out, evinfo);
              break;
+         case EI_VIRTUAL_THREAD_START:
+         case EI_VIRTUAL_THREAD_END:
+             /* Note that when we wrote the evinfo->ei byte above, it was mapped to an EI_THREAD_XXX event
+              * by eventIndex2jdwp(), so we didn't actually write the VIRTUAL_THREAD ei byte.
+              */
+             writeThreadEvent(env, out, evinfo);
+             break;
          case EI_CLASS_LOAD:
          case EI_CLASS_PREPARE:
              writeClassEvent(env, out, evinfo);
              break;
          case EI_MONITOR_CONTENDED_ENTER:

*** 559,10 ***
--- 566,14 ---
          }
      }
  
      outStream_sendCommand(&out);
      outStream_destroy(&out);
+ 
+     // vthread fixme: if we didn't do any suspending, we should allow the vthread ThreadNode
+     // to be released at this point. The thread in question can be extracted the way it is
+     // done in the first loop above.
  }
  
  static void
  handleReportInvokeDoneCommand(JNIEnv* env, ReportInvokeDoneCommand *command)
  {
< prev index next >