equal
deleted
inserted
replaced
105 if ( !caller_is_deopted()) { |
105 if ( !caller_is_deopted()) { |
106 JavaThread* thread = JavaThread::current(); |
106 JavaThread* thread = JavaThread::current(); |
107 RegisterMap reg_map(thread, false); |
107 RegisterMap reg_map(thread, false); |
108 frame runtime_frame = thread->last_frame(); |
108 frame runtime_frame = thread->last_frame(); |
109 frame caller_frame = runtime_frame.sender(®_map); |
109 frame caller_frame = runtime_frame.sender(®_map); |
110 // bypass VM_DeoptimizeFrame and deoptimize the frame directly |
|
111 Deoptimization::deoptimize_frame(thread, caller_frame.id()); |
110 Deoptimization::deoptimize_frame(thread, caller_frame.id()); |
112 assert(caller_is_deopted(), "Must be deoptimized"); |
111 assert(caller_is_deopted(), "Must be deoptimized"); |
113 } |
112 } |
114 } |
113 } |
115 |
114 |
366 JRT_BLOCK |
365 JRT_BLOCK |
367 osr_nm = counter_overflow_helper(thread, bci, method); |
366 osr_nm = counter_overflow_helper(thread, bci, method); |
368 if (osr_nm != NULL) { |
367 if (osr_nm != NULL) { |
369 RegisterMap map(thread, false); |
368 RegisterMap map(thread, false); |
370 frame fr = thread->last_frame().sender(&map); |
369 frame fr = thread->last_frame().sender(&map); |
371 VM_DeoptimizeFrame deopt(thread, fr.id()); |
370 Deoptimization::deoptimize_frame(thread, fr.id()); |
372 VMThread::execute(&deopt); |
|
373 } |
371 } |
374 JRT_BLOCK_END |
372 JRT_BLOCK_END |
375 return NULL; |
373 return NULL; |
376 JRT_END |
374 JRT_END |
377 |
375 |
439 frame caller_frame = stub_frame.sender(®_map); |
437 frame caller_frame = stub_frame.sender(®_map); |
440 |
438 |
441 // We don't really want to deoptimize the nmethod itself since we |
439 // We don't really want to deoptimize the nmethod itself since we |
442 // can actually continue in the exception handler ourselves but I |
440 // can actually continue in the exception handler ourselves but I |
443 // don't see an easy way to have the desired effect. |
441 // don't see an easy way to have the desired effect. |
444 VM_DeoptimizeFrame deopt(thread, caller_frame.id()); |
442 Deoptimization::deoptimize_frame(thread, caller_frame.id()); |
445 VMThread::execute(&deopt); |
443 assert(caller_is_deopted(), "Must be deoptimized"); |
446 |
444 |
447 return SharedRuntime::deopt_blob()->unpack_with_exception_in_tls(); |
445 return SharedRuntime::deopt_blob()->unpack_with_exception_in_tls(); |
448 } |
446 } |
449 |
447 |
450 // ExceptionCache is used only for exceptions at call and not for implicit exceptions |
448 // ExceptionCache is used only for exceptions at call and not for implicit exceptions |
833 nmethod* nm = CodeCache::find_nmethod(caller_frame.pc()); |
831 nmethod* nm = CodeCache::find_nmethod(caller_frame.pc()); |
834 if (nm != NULL) { |
832 if (nm != NULL) { |
835 nm->make_not_entrant(); |
833 nm->make_not_entrant(); |
836 } |
834 } |
837 |
835 |
838 VM_DeoptimizeFrame deopt(thread, caller_frame.id()); |
836 Deoptimization::deoptimize_frame(thread, caller_frame.id()); |
839 VMThread::execute(&deopt); |
|
840 |
837 |
841 // Return to the now deoptimized frame. |
838 // Return to the now deoptimized frame. |
842 } |
839 } |
843 |
840 |
844 // If we are patching in a non-perm oop, make sure the nmethod |
841 // If we are patching in a non-perm oop, make sure the nmethod |