]> gcc.gnu.org Git - gcc.git/blob - libjava/include/jvmti-int.h
jvmti.cc (_Jv_JVMTI_DisposeEnvironment): Check for enabled events.
[gcc.git] / libjava / include / jvmti-int.h
1 /* jvmti-int.h -- Internal JVMTI definitions
2 Copyright (C) 2006 Free Software Foundation, Inc.
3
4 This file is part of GNU Classpath.
5
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 02110-1301 USA.
20
21 As a special exception, if you link this library with other files to
22 produce an executable, this library does not by itself cause the
23 resulting executable to be covered by the GNU General Public License.
24 This exception does not however invalidate any other reasons why the
25 executable file might be covered by the GNU General Public License. */
26
27 #ifndef __GCJ_JVTMI_INT_H__
28 #define __GCJ_JVMTI_INT_H__
29
30 /* A macro to map jvmtiEvent to an index in thread[] and enabled[]
31 in the jvmtiEnv. This will only work if the order of events listed
32 in jvmtiEvent and jvmtiEventCallbacks is kept the same (which should
33 not be a problem). */
34 #define EVENT_INDEX(jvmtievent) (int)(jvmtievent - JVMTI_EVENT_VM_INIT)
35
36 /* A few globals to help limit the impact of JVMTI on normal operations.
37 False means no JVMTI environment requested that event type. */
38 namespace JVMTI
39 {
40 bool VMInit;
41 bool VMDeath;
42 bool ThreadStart;
43 bool ThreadEnd;
44 bool ClassFileLoadHook;
45 bool ClassLoad;
46 bool ClassPrepare;
47 bool VMStart;
48 bool Exception;
49 bool ExceptionCatch;
50 bool SingleStep;
51 bool FramePop;
52 bool Breakpoint;
53 bool FieldAccess;
54 bool FieldModification;
55 bool MethodEntry;
56 bool MethodExit;
57 bool NativeMethodBind;
58 bool CompiledMethodLoad;
59 bool CompiledMethodUnload;
60 bool DynamicCodeGenerated;
61 bool DataDumpRequest;
62 bool reserved72;
63 bool MonitorWait;
64 bool MonitorWaited;
65 bool MonitorContendedEnter;
66 bool MonitorContendedEntered;
67 bool reserved77;
68 bool reserved78;
69 bool reserved79;
70 bool reserved80;
71 bool GarbageCollectionStart;
72 bool GarbageCollectionFinish;
73 bool ObjectFree;
74 bool VMObjectAlloc;
75 };
76
77 /* A macro to test whether an event should be posted to JVMTI.*/
78 #define JVMTI_REQUESTED_EVENT(Event) __builtin_expect (JVMTI::Event, false)
79
80 /* Post the event to requesting JVMTI environments.
81
82 For speed, this function should only be called after
83 JVMTI_REQUESTED_EVENT is checked. */
84 extern void _Jv_JVMTI_PostEvent (jvmtiEvent type, jthread event_thread, ...);
85 #endif /* __GCJ_JVMTI_INT_H__ */
This page took 0.04053 seconds and 6 git commands to generate.