< prev index next >

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

Print this page
*** 81,10 ***
--- 81,14 ---
      jvmtiEnv *jvmti;
      JavaVM   *jvm;
      volatile jboolean vmDead; /* Once VM is dead it stays that way - don't put in init */
      jboolean assertOn;
      jboolean assertFatal;
+     jboolean vthreadsSupported; /* If true, debugging support for vthreads is enabled.*/
+     jboolean enumerateVThreads; /* If true, JDWP APIs returns vthreads in thread lists. */
+     jboolean notifyVThreads;    /* If true, all vthread START and DEATH events are sent, subject to filtering. */
+     jboolean trackAllVThreads;  /* If true, track all vthreads. Otherwise just track ones we need to track. */
      jboolean doerrorexit;
      jboolean modifiedUtf8;
      jboolean quiet;
  
      /* Debug flags (bit mask) */

*** 105,10 ***
--- 109,11 ---
      jmethodID           threadSetDaemon;
      jmethodID           threadResume;
      jmethodID           systemGetProperty;
      jmethodID           setProperty;
      jthreadGroup        systemThreadGroup;
+     jthreadGroup        vthreadThreadGroup;
      jobject             agent_properties;
  
      jint                cachedJvmtiVersion;
      jvmtiCapabilities   cachedJvmtiCapabilities;
      jboolean            haveCachedJvmtiCapabilities;

*** 168,11 ***
          EI_MONITOR_CONTENDED_ENTERED = 16,
          EI_MONITOR_WAIT         = 17,
          EI_MONITOR_WAITED       = 18,
          EI_VM_INIT              = 19,
          EI_VM_DEATH             = 20,
!         EI_max                  = 20
  } EventIndex;
  
  /* Agent errors that might be in a jvmtiError for JDWP or internal.
   *    (Done this way so that compiler allows it's use as a jvmtiError)
   */
--- 173,14 ---
          EI_MONITOR_CONTENDED_ENTERED = 16,
          EI_MONITOR_WAIT         = 17,
          EI_MONITOR_WAITED       = 18,
          EI_VM_INIT              = 19,
          EI_VM_DEATH             = 20,
!         EI_VIRTUAL_THREAD_START = 21,
+         EI_VIRTUAL_THREAD_END   = 22,
+ 
+         EI_max                  = 22
  } EventIndex;
  
  /* Agent errors that might be in a jvmtiError for JDWP or internal.
   *    (Done this way so that compiler allows it's use as a jvmtiError)
   */

*** 209,10 ***
--- 217,11 ---
  
  typedef struct {
  
      EventIndex  ei;
      jthread     thread;
+     jboolean    is_vthread;
      jclass      clazz;
      jmethodID   method;
      jlocation   location;
      jobject     object; /* possibly an exception or user object */
  

*** 325,10 ***
--- 334,11 ---
  /*
   * Thin wrappers on top of JNI
   */
  JNIEnv *getEnv(void);
  jboolean isClass(jobject object);
+ jboolean isVThread(jobject object);
  jboolean isThread(jobject object);
  jboolean isThreadGroup(jobject object);
  jboolean isString(jobject object);
  jboolean isClassLoader(jobject object);
  jboolean isArray(jobject object);
< prev index next >