1 /*
2 * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24 #ifndef _JAVA_JVMTIENVTHREADSTATE_H_
25 #define _JAVA_JVMTIENVTHREADSTATE_H_
26
27 class JvmtiEnv;
28
29 ///////////////////////////////////////////////////////////////
30 //
31 // class JvmtiFramePop
32 // Used by : JvmtiFramePops
33 // Used by JVMTI methods: none directly.
34 //
35 // Wrapper class for FramePop, used in the JvmtiFramePops class.
36 //
37 // Two problems: 1) this isn't being used as a ValueObj class, in
38 // several places there are constructors for it. 2) It seems like
39 // overkill as a means to get an assert and name the geater than
40 // operator. I'm trying to to rewrite everything.
41
42 class JvmtiFramePop VALUE_OBJ_CLASS_SPEC {
43 private:
44 // Frame number counting from BOTTOM (oldest) frame;
45 // bottom frame == #0
157 return _single_stepping_posted;
158 }
159
160 inline JavaThread *get_thread() { return _thread; }
161 inline JvmtiEnv *get_env() { return _env; }
162
163 // lazily initialize _frame_pops
164 JvmtiFramePops* get_frame_pops();
165
166 bool has_frame_pops();
167
168 // quickly test whether we should deliver a frame pop event on return from sp
169 bool is_frame_pop(int cur_stack_depth);
170
171 void set_frame_pop(int frame_number);
172 void clear_frame_pop(int frame_number);
173 void clear_to_frame_pop(int frame_number);
174
175 };
176
177 #endif /* _JAVA_JVMTIENVTHREADSTATE_H_ */
|
1 /*
2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_PRIMS_JVMTIENVTHREADSTATE_HPP
26 #define SHARE_VM_PRIMS_JVMTIENVTHREADSTATE_HPP
27
28 #include "jvmtifiles/jvmti.h"
29 #include "memory/allocation.hpp"
30 #include "memory/allocation.inline.hpp"
31 #include "oops/instanceKlass.hpp"
32 #include "prims/jvmtiEventController.hpp"
33 #include "utilities/globalDefinitions.hpp"
34 #include "utilities/growableArray.hpp"
35
36 class JvmtiEnv;
37
38 ///////////////////////////////////////////////////////////////
39 //
40 // class JvmtiFramePop
41 // Used by : JvmtiFramePops
42 // Used by JVMTI methods: none directly.
43 //
44 // Wrapper class for FramePop, used in the JvmtiFramePops class.
45 //
46 // Two problems: 1) this isn't being used as a ValueObj class, in
47 // several places there are constructors for it. 2) It seems like
48 // overkill as a means to get an assert and name the geater than
49 // operator. I'm trying to to rewrite everything.
50
51 class JvmtiFramePop VALUE_OBJ_CLASS_SPEC {
52 private:
53 // Frame number counting from BOTTOM (oldest) frame;
54 // bottom frame == #0
166 return _single_stepping_posted;
167 }
168
169 inline JavaThread *get_thread() { return _thread; }
170 inline JvmtiEnv *get_env() { return _env; }
171
172 // lazily initialize _frame_pops
173 JvmtiFramePops* get_frame_pops();
174
175 bool has_frame_pops();
176
177 // quickly test whether we should deliver a frame pop event on return from sp
178 bool is_frame_pop(int cur_stack_depth);
179
180 void set_frame_pop(int frame_number);
181 void clear_frame_pop(int frame_number);
182 void clear_to_frame_pop(int frame_number);
183
184 };
185
186 #endif // SHARE_VM_PRIMS_JVMTIENVTHREADSTATE_HPP
|