comparison src/share/vm/runtime/sharedRuntime.cpp @ 4673:8021e46f4a99

another fix for resolving the issue with biased monitor and deoptimization
author Christian Haeubl <christian.haeubl@oracle.com>
date Wed, 22 Feb 2012 16:53:23 -0800
parents f9811bcf3402
children 6336b144e391
comparison
equal deleted inserted replaced
4672:7167f487cc31 4673:8021e46f4a99
714 714
715 #ifdef COMPILER1 715 #ifdef COMPILER1
716 if (t == NULL && nm->is_compiled_by_c1()) { 716 if (t == NULL && nm->is_compiled_by_c1()) {
717 #ifdef GRAAL 717 #ifdef GRAAL
718 nm->make_not_entrant(); 718 nm->make_not_entrant();
719 JavaThread::current()->set_exception_pc(ret_pc); 719 JavaThread* thread = JavaThread::current();
720 JavaThread::current()->set_exception_oop(exception()); 720 // save the exception for deoptimization
721 JavaThread::current()->clear_pending_exception(); 721 thread->set_exception_pc(ret_pc);
722 thread->set_exception_oop(exception());
723 // clear the pending exception and deoptimize the frame
724 thread->clear_pending_exception();
725 RegisterMap reg_map(thread, false);
726 frame runtime_frame = thread->last_frame();
727 frame caller_frame = runtime_frame.sender(&reg_map);
728 Deoptimization::deoptimize_frame(thread, caller_frame.id());
722 return SharedRuntime::deopt_blob()->unpack_with_exception_in_tls(); 729 return SharedRuntime::deopt_blob()->unpack_with_exception_in_tls();
723 #else 730 #else
724 assert(nm->unwind_handler_begin() != NULL, ""); 731 assert(nm->unwind_handler_begin() != NULL, "");
725 return nm->unwind_handler_begin(); 732 return nm->unwind_handler_begin();
726 #endif 733 #endif