198 // Assume the compiler is (or will be) interested in this event. |
198 // Assume the compiler is (or will be) interested in this event. |
199 // If necessary, create an MDO to hold the information, and record it. |
199 // If necessary, create an MDO to hold the information, and record it. |
200 void InterpreterRuntime::note_trap(JavaThread* thread, int reason, TRAPS) { |
200 void InterpreterRuntime::note_trap(JavaThread* thread, int reason, TRAPS) { |
201 assert(ProfileTraps, "call me only if profiling"); |
201 assert(ProfileTraps, "call me only if profiling"); |
202 methodHandle trap_method(thread, method(thread)); |
202 methodHandle trap_method(thread, method(thread)); |
|
203 |
203 if (trap_method.not_null()) { |
204 if (trap_method.not_null()) { |
204 methodDataHandle trap_mdo(thread, trap_method->method_data()); |
205 methodDataHandle trap_mdo(thread, trap_method->method_data()); |
205 if (trap_mdo.is_null()) { |
206 if (trap_mdo.is_null()) { |
206 methodOopDesc::build_interpreter_method_data(trap_method, THREAD); |
207 methodOopDesc::build_interpreter_method_data(trap_method, THREAD); |
207 if (HAS_PENDING_EXCEPTION) { |
208 if (HAS_PENDING_EXCEPTION) { |