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
This commit is contained in:
parent
14c7148908
commit
ebf29cf63f
7 changed files with 1429 additions and 3 deletions
|
@ -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__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue