comparison src/share/vm/runtime/sharedRuntime.cpp @ 18405:4a1b4400bb1f

SharedRuntime::compute_compiled_exc_handler: explain why it seems that we deoptimzie twice, use Deoptimization::deoptimize since we already have our hands on the frame.
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 18 Nov 2014 11:03:39 +0100
parents 03c63fd2f714
children 7848fc12602b
comparison
equal deleted inserted replaced
18404:03c63fd2f714 18405:4a1b4400bb1f
657 if (t != NULL) { 657 if (t != NULL) {
658 return nm->code_begin() + t->pco(); 658 return nm->code_begin() + t->pco();
659 } else { 659 } else {
660 // there is no exception handler for this pc => deoptimize 660 // there is no exception handler for this pc => deoptimize
661 nm->make_not_entrant(); 661 nm->make_not_entrant();
662
663 // Use Deoptimization::deoptimize for all of its side-effects:
664 // revoking biases of monitors, gathering traps statistics, logging...
665 // it also patches the return pc but we do not care about that
666 // since we return a continuation to the deopt_blob below.
662 JavaThread* thread = JavaThread::current(); 667 JavaThread* thread = JavaThread::current();
663 RegisterMap reg_map(thread); 668 RegisterMap reg_map(thread, UseBiasedLocking);
664 frame runtime_frame = thread->last_frame(); 669 frame runtime_frame = thread->last_frame();
665 frame caller_frame = runtime_frame.sender(&reg_map); 670 frame caller_frame = runtime_frame.sender(&reg_map);
666 Deoptimization::deoptimize_frame(thread, caller_frame.id(), Deoptimization::Reason_not_compiled_exception_handler); 671 Deoptimization::deoptimize(thread, caller_frame, &reg_map, Deoptimization::Reason_not_compiled_exception_handler);
672
667 return SharedRuntime::deopt_blob()->unpack_with_exception_in_tls(); 673 return SharedRuntime::deopt_blob()->unpack_with_exception_in_tls();
668 } 674 }
669 } 675 }
670 #endif 676 #endif
671 677