< prev index next >

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

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 75,108 **** --- 75,119 ---- 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 fibersSupported; /* If true, debugging support for fibers is enabled.*/ + jboolean notifyDebuggerOfAllFibers; /* If true, the debugger will be notified of all known fibers. + * If false the debugger is only notified of fibers for which + * certain events have been received. */ jboolean doerrorexit; jboolean modifiedUtf8; jboolean quiet; + jboolean ignoreEvents; + /* Debug flags (bit mask) */ int debugflags; /* Possible debug flags */ #define USE_ITERATE_THROUGH_HEAP 0X001 char * options; jclass classClass; + jclass fiberClass; jclass threadClass; jclass threadGroupClass; jclass classLoaderClass; jclass stringClass; jclass systemClass; + jclass innocuousThreadClass; /* fibers fixme: get rid of once helper threads go away */ + jmethodID fiberToString; + jmethodID fiberTryMountAndSuspend; jmethodID threadConstructor; jmethodID threadSetDaemon; jmethodID threadResume; jmethodID systemGetProperty; jmethodID setProperty; jthreadGroup systemThreadGroup; + jthreadGroup fiberThreadGroup; jobject agent_properties; jint cachedJvmtiVersion; jvmtiCapabilities cachedJvmtiCapabilities; jboolean haveCachedJvmtiCapabilities;
*** 158,168 **** 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) */ --- 169,186 ---- EI_MONITOR_CONTENDED_ENTERED = 16, EI_MONITOR_WAIT = 17, EI_MONITOR_WAITED = 18, EI_VM_INIT = 19, EI_VM_DEATH = 20, ! EI_FIBER_SCHEDULED = 21, ! EI_FIBER_TERMINATED = 22, ! EI_FIBER_MOUNT = 23, ! EI_FIBER_UNMOUNT = 24, ! EI_CONTINUATION_RUN = 25, ! EI_CONTINUATION_YIELD = 26, ! ! EI_max = 26 } 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) */
*** 199,208 **** --- 217,230 ---- typedef struct { EventIndex ei; jthread thread; + jthread fiber; /* NULL if not running on a fiber. */ + jboolean matchesFiber; /* true if the matching HandlerNode specified a fiber that matched, + or the HandlerNode specified no thread and the event came in on a + carrier thread running a fiber. */ jclass clazz; jmethodID method; jlocation location; jobject object; /* possibly an exception or user object */
*** 323,332 **** --- 345,355 ---- /* * Thin wrappers on top of JNI */ JNIEnv *getEnv(void); jboolean isClass(jobject object); + jboolean isFiber(jobject object); jboolean isThread(jobject object); jboolean isThreadGroup(jobject object); jboolean isString(jobject object); jboolean isClassLoader(jobject object); jboolean isArray(jobject object);
*** 366,375 **** --- 389,403 ---- jvmtiError isMethodSynthetic(jmethodID, jboolean*); jvmtiError isFieldSynthetic(jclass, jfieldID, jboolean*); jboolean isSameObject(JNIEnv *env, jobject o1, jobject o2); + jthread getThreadFiber(jthread thread); + jthread getFiberThread(jthread fiber); + + jint getThreadFrameCount(jthread thread); + jint objectHashCode(jobject); jvmtiError allInterfaces(jclass clazz, jclass **ppinterfaces, jint *count); jvmtiError allLoadedClasses(jclass **ppclasses, jint *count); jvmtiError allClassLoaderClasses(jobject loader, jclass **ppclasses, jint *count);
*** 379,388 **** --- 407,417 ---- void *jvmtiAllocate(jint numBytes); void jvmtiDeallocate(void *buffer); void eventIndexInit(void); + char* eventIndex2EventName(EventIndex ei); jdwpEvent eventIndex2jdwp(EventIndex i); jvmtiEvent eventIndex2jvmti(EventIndex i); EventIndex jdwp2EventIndex(jdwpEvent eventType); EventIndex jvmti2EventIndex(jvmtiEvent kind);
< prev index next >