Mercurial > hg > truffle
comparison src/share/vm/c1/c1_Runtime1.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 | 723df37192d6 |
children | 9d48ccb39292 |
comparison
equal
deleted
inserted
replaced
4672:7167f487cc31 | 4673:8021e46f4a99 |
---|---|
556 // If an exception was thrown during exception dispatch, the exception oop may have changed | 556 // If an exception was thrown during exception dispatch, the exception oop may have changed |
557 thread->set_exception_oop(exception()); | 557 thread->set_exception_oop(exception()); |
558 thread->set_exception_pc(pc); | 558 thread->set_exception_pc(pc); |
559 | 559 |
560 // the exception cache is used only by non-implicit exceptions | 560 // the exception cache is used only by non-implicit exceptions |
561 if (continuation != NULL) { | 561 if (continuation != NULL && !SharedRuntime::deopt_blob()->contains(continuation)) { |
562 nm->add_handler_for_exception_and_pc(exception, pc, continuation); | 562 nm->add_handler_for_exception_and_pc(exception, pc, continuation); |
563 } | 563 } |
564 } | 564 } |
565 | 565 |
566 thread->set_vm_result(exception()); | 566 thread->set_vm_result(exception()); |
593 // Enter VM mode by calling the helper | 593 // Enter VM mode by calling the helper |
594 ResetNoHandleMark rnhm; | 594 ResetNoHandleMark rnhm; |
595 continuation = exception_handler_for_pc_helper(thread, exception, pc, nm); | 595 continuation = exception_handler_for_pc_helper(thread, exception, pc, nm); |
596 } | 596 } |
597 // Back in JAVA, use no oops DON'T safepoint | 597 // Back in JAVA, use no oops DON'T safepoint |
598 | |
599 // Now check to see if the nmethod we were called from is now deoptimized. | 598 // Now check to see if the nmethod we were called from is now deoptimized. |
600 // If so we must return to the deopt blob and deoptimize the nmethod | 599 // If so we must return to the deopt blob and deoptimize the nmethod |
601 if (nm != NULL && caller_is_deopted()) { | 600 if (nm != NULL && caller_is_deopted()) { |
602 continuation = SharedRuntime::deopt_blob()->unpack_with_exception_in_tls(); | 601 continuation = SharedRuntime::deopt_blob()->unpack_with_exception_in_tls(); |
603 } | 602 } |