diff options
author | Keith Seitz <keiths@redhat.com> | 2006-09-22 02:12:12 +0000 |
---|---|---|
committer | Keith Seitz <kseitz@gcc.gnu.org> | 2006-09-22 02:12:12 +0000 |
commit | ebf29cf63fabc0fa94e49f4c0107e7bc2619d0d2 (patch) | |
tree | dc10194c5e3de3be031b390e9eb5e63ac548d9d5 /libjava/include/jvmti_md.h | |
parent | 14c7148908aa7b4880d5e812234619b596510fce (diff) | |
download | gcc-ebf29cf63fabc0fa94e49f4c0107e7bc2619d0d2.zip gcc-ebf29cf63fabc0fa94e49f4c0107e7bc2619d0d2.tar.gz gcc-ebf29cf63fabc0fa94e49f4c0107e7bc2619d0d2.tar.bz2 |
jvmti.cc (_Jv_JVMTI_DisposeEnvironment): Check for enabled events.
* jvmti.cc (_Jv_JVMTI_DisposeEnvironment): Check for enabled
events.
(check_enabled_event): New function.
(check_enabled_events): New function.
(post_event): New function.
(_Jv_JVMTI_SetEventNotificationMode): New function.
(_Jv_JVMTI_SetEventCallbacks): New function.
(_Jv_JVMTI_Interface): Define SetEventNotificationMode and
SetEventCallbacks members.
* include/jvmti-int.h: New file.
* include/jvmti_md.h (EVENT_SLOTS) [__GCJ_JNI_IMP__]: Define.
(_CLASSPATH_JVMTIENV_CONTENTS) [__GCJ_JNI_IMPL__]: Define.
* testsuite/libjava.jvmti/events.java: New file.
* testsuite/libjava.jvmti/events.out: New file.
* testsuite/libjava.jvmti/natevents.cc: New file.
From-SVN: r117133
Diffstat (limited to 'libjava/include/jvmti_md.h')
-rw-r--r-- | libjava/include/jvmti_md.h | 28 |
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__ */ |