aboutsummaryrefslogtreecommitdiff
path: root/libjava/include/jvmti_md.h
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/include/jvmti_md.h')
-rw-r--r--libjava/include/jvmti_md.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/libjava/include/jvmti_md.h b/libjava/include/jvmti_md.h
index ab920b9..549d421 100644
--- a/libjava/include/jvmti_md.h
+++ b/libjava/include/jvmti_md.h
@@ -27,6 +27,32 @@ executable file might be covered by the GNU General Public License. */
#ifndef __GCJ_JVMTI_MD_H__
#define __GCJ_JVMTI_MD_H__
-// nothing
+#ifdef __GCJ_JNI_IMPL__
+
+/* If __GCJ_JNI_IMPL__ is defined, then we assume that we're building
+ libgcj itself, and we include functions which should not be exposed
+ to JVMTI users. */
+
+/* The number of event slots needed to keep track of event reporting
+ constraints for an environment. This will only work if the order of
+ events listed in jvmtiEvent and jvmtiEventCallbacks is kept the same
+ (which should not be a problem). */
+#define EVENT_SLOTS \
+ (int)(JVMTI_EVENT_VM_OBJECT_ALLOC - JVMTI_EVENT_VM_INIT + 1)
+
+/* Contents of the jvmtiEnv; but only inside the implementation. */
+#define _CLASSPATH_JVMTIENV_CONTENTS \
+ /* Event handlers registered via SetEventCallbacks */ \
+ jvmtiEventCallbacks callbacks; \
+ \
+ /* Array of event thread for which to report event. */ \
+ /* NULL means all threads. One for each callback. */ \
+ jthread thread[EVENT_SLOTS]; \
+ \
+ /* Array of notification modes for callbacks. */ \
+ /* One for each callback. */ \
+ bool enabled[EVENT_SLOTS];
+
+#endif /* __GCJ_JNI_IMPL__ */
#endif /* __GCJ_JVMTI_MD_H__ */