193 Bytecodes::Code code_at(int bci) const { |
193 Bytecodes::Code code_at(int bci) const { |
194 return Bytecodes::code_at(this, bcp_from(bci)); |
194 return Bytecodes::code_at(this, bcp_from(bci)); |
195 } |
195 } |
196 |
196 |
197 // JVMTI breakpoints |
197 // JVMTI breakpoints |
|
198 #if !INCLUDE_JVMTI |
|
199 Bytecodes::Code orig_bytecode_at(int bci) const { |
|
200 ShouldNotReachHere(); |
|
201 return Bytecodes::_shouldnotreachhere; |
|
202 } |
|
203 void set_orig_bytecode_at(int bci, Bytecodes::Code code) { |
|
204 ShouldNotReachHere(); |
|
205 }; |
|
206 u2 number_of_breakpoints() const {return 0;} |
|
207 #else // !INCLUDE_JVMTI |
198 Bytecodes::Code orig_bytecode_at(int bci) const; |
208 Bytecodes::Code orig_bytecode_at(int bci) const; |
199 void set_orig_bytecode_at(int bci, Bytecodes::Code code); |
209 void set_orig_bytecode_at(int bci, Bytecodes::Code code); |
200 void set_breakpoint(int bci); |
210 void set_breakpoint(int bci); |
201 void clear_breakpoint(int bci); |
211 void clear_breakpoint(int bci); |
202 void clear_all_breakpoints(); |
212 void clear_all_breakpoints(); |
203 // Tracking number of breakpoints, for fullspeed debugging. |
213 // Tracking number of breakpoints, for fullspeed debugging. |
204 // Only mutated by VM thread. |
214 // Only mutated by VM thread. |
227 MethodCounters* mcs = method_counters(); |
237 MethodCounters* mcs = method_counters(); |
228 if (mcs != NULL) { |
238 if (mcs != NULL) { |
229 mcs->clear_number_of_breakpoints(); |
239 mcs->clear_number_of_breakpoints(); |
230 } |
240 } |
231 } |
241 } |
|
242 #endif // !INCLUDE_JVMTI |
232 |
243 |
233 // index into InstanceKlass methods() array |
244 // index into InstanceKlass methods() array |
234 // note: also used by jfr |
245 // note: also used by jfr |
235 u2 method_idnum() const { return constMethod()->method_idnum(); } |
246 u2 method_idnum() const { return constMethod()->method_idnum(); } |
236 void set_method_idnum(u2 idnum) { constMethod()->set_method_idnum(idnum); } |
247 void set_method_idnum(u2 idnum) { constMethod()->set_method_idnum(idnum); } |
1044 int bci() const { return _bci; } |
1055 int bci() const { return _bci; } |
1045 int line() const { return _line; } |
1056 int line() const { return _line; } |
1046 }; |
1057 }; |
1047 |
1058 |
1048 |
1059 |
|
1060 #if INCLUDE_JVMTI |
|
1061 |
1049 /// Fast Breakpoints. |
1062 /// Fast Breakpoints. |
1050 |
1063 |
1051 // If this structure gets more complicated (because bpts get numerous), |
1064 // If this structure gets more complicated (because bpts get numerous), |
1052 // move it into its own header. |
1065 // move it into its own header. |
1053 |
1066 |
1088 |
1101 |
1089 void set(Method* method); |
1102 void set(Method* method); |
1090 void clear(Method* method); |
1103 void clear(Method* method); |
1091 }; |
1104 }; |
1092 |
1105 |
|
1106 #endif // INCLUDE_JVMTI |
|
1107 |
1093 // Utility class for access exception handlers |
1108 // Utility class for access exception handlers |
1094 class ExceptionTable : public StackObj { |
1109 class ExceptionTable : public StackObj { |
1095 private: |
1110 private: |
1096 ExceptionTableElement* _table; |
1111 ExceptionTableElement* _table; |
1097 u2 _length; |
1112 u2 _length; |