jvmti_md.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* jvmti_md.h
  2. Copyright (C) 2006, 2007 Free Software Foundation, Inc.
  3. This file is part of GNU Classpath.
  4. GNU Classpath is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.
  8. GNU Classpath is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GNU Classpath; see the file COPYING. If not, write to the
  14. Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  15. 02110-1301 USA.
  16. As a special exception, if you link this library with other files to
  17. produce an executable, this library does not by itself cause the
  18. resulting executable to be covered by the GNU General Public License.
  19. This exception does not however invalidate any other reasons why the
  20. executable file might be covered by the GNU General Public License. */
  21. #ifndef __GCJ_JVMTI_MD_H__
  22. #define __GCJ_JVMTI_MD_H__
  23. #ifdef __GCJ_JNI_IMPL__
  24. /* If __GCJ_JNI_IMPL__ is defined, then we assume that we're building
  25. libgcj itself, and we include functions which should not be exposed
  26. to JVMTI users. */
  27. /* The number of event slots needed to keep track of event reporting
  28. constraints for an environment. This will only work if the order of
  29. events listed in jvmtiEvent and jvmtiEventCallbacks is kept the same
  30. (which should not be a problem). */
  31. #define EVENT_SLOTS \
  32. (int)(JVMTI_EVENT_VM_OBJECT_ALLOC - JVMTI_EVENT_VM_INIT + 1)
  33. /* Contents of the jvmtiEnv; but only inside the implementation. */
  34. #define _CLASSPATH_JVMTIENV_CONTENTS \
  35. /* Event handlers registered via SetEventCallbacks */ \
  36. jvmtiEventCallbacks callbacks; \
  37. \
  38. /* Array of event thread for which to report event. */ \
  39. /* NULL means all threads. One for each callback. */ \
  40. jthread thread[EVENT_SLOTS]; \
  41. \
  42. /* Array of notification modes for callbacks. */ \
  43. /* One for each callback. */ \
  44. bool enabled[EVENT_SLOTS];
  45. /* Redefine the standard JVMTI types to something a little more
  46. precise than "jobject". */
  47. #define _CLASSPATH_VM_JVMTI_TYPES_DEFINED
  48. typedef java::lang::Thread *jthread;
  49. typedef java::lang::ThreadGroup *jthreadGroup;
  50. typedef jlong jlocation;
  51. typedef struct _Jv_rawMonitorID *jrawMonitorID;
  52. #endif /* __GCJ_JNI_IMPL__ */
  53. #endif /* __GCJ_JVMTI_MD_H__ */