Mercurial > hg > truffle
diff src/share/vm/runtime/sharedRuntime.cpp @ 2607:008adfd6d850
Fixed the stateBefore of invokes and monitorenter instructions to include the arguments of the instruction.
This is necessary to ensure correct continuation in the interpreter when the stateBefore is used as a deoptimization point.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Fri, 06 May 2011 17:47:17 +0200 |
parents | 98fa88528319 |
children | b1b58f908044 |
line wrap: on
line diff
--- a/src/share/vm/runtime/sharedRuntime.cpp Fri May 06 16:21:10 2011 +0200 +++ b/src/share/vm/runtime/sharedRuntime.cpp Fri May 06 17:47:17 2011 +0200 @@ -692,6 +692,15 @@ throw_and_post_jvmti_exception(thread, exception); JRT_END +address SharedRuntime::deoptimization_continuation(JavaThread* thread, address pc, nmethod* nm) +{ + if (TraceSignals) { + tty->print_cr(err_msg("Deoptimizing on implicit exception at relative pc=%d in method %s", pc - nm->entry_point(), nm->method()->name()->as_C_string())); + } + thread->_ScratchA = (intptr_t)pc; + return (SharedRuntime::deopt_blob()->jmp_uncommon_trap()); +} + address SharedRuntime::continuation_for_implicit_exception(JavaThread* thread, address pc, SharedRuntime::ImplicitExceptionKind exception_kind) @@ -777,11 +786,7 @@ _implicit_null_throws++; #endif if (UseC1X) { - if (TraceSignals) { - tty->print_cr(err_msg("calling implicit call stub relative pc=%d method name = %s", pc - nm->entry_point(), nm->method()->name()->as_C_string())); - } - thread->_ScratchA = (intptr_t)pc; - target_pc = (SharedRuntime::deopt_blob()->jmp_uncommon_trap());//Runtime1::entry_for(Runtime1::c1x_global_implicit_null_id); + target_pc = deoptimization_continuation(thread, pc, nm); } else { target_pc = nm->continuation_for_implicit_exception(pc); }