Mercurial > hg > graal-jvmci-8
comparison src/share/vm/interpreter/bytecodeInterpreter.cpp @ 14417:f3806614494a
8024469: PPC64 (part 202): cppInterpreter: support for OSR.
Summary: Call OSR migration with last java frame.
Reviewed-by: kvn
author | goetz |
---|---|
date | Fri, 13 Sep 2013 22:50:47 +0200 |
parents | bdd155477289 |
children | abe03600372a |
comparison
equal
deleted
inserted
replaced
14416:6a936747b569 | 14417:f3806614494a |
---|---|
343 if (do_OSR) do_OSR = mcs->backedge_counter()->reached_InvocationLimit(); \ | 343 if (do_OSR) do_OSR = mcs->backedge_counter()->reached_InvocationLimit(); \ |
344 if (do_OSR) { \ | 344 if (do_OSR) { \ |
345 nmethod* osr_nmethod; \ | 345 nmethod* osr_nmethod; \ |
346 OSR_REQUEST(osr_nmethod, branch_pc); \ | 346 OSR_REQUEST(osr_nmethod, branch_pc); \ |
347 if (osr_nmethod != NULL && osr_nmethod->osr_entry_bci() != InvalidOSREntryBci) { \ | 347 if (osr_nmethod != NULL && osr_nmethod->osr_entry_bci() != InvalidOSREntryBci) { \ |
348 intptr_t* buf = SharedRuntime::OSR_migration_begin(THREAD); \ | 348 intptr_t* buf; \ |
349 /* Call OSR migration with last java frame only, no checks. */ \ | |
350 CALL_VM_NAKED_LJF(buf=SharedRuntime::OSR_migration_begin(THREAD)); \ | |
349 istate->set_msg(do_osr); \ | 351 istate->set_msg(do_osr); \ |
350 istate->set_osr_buf((address)buf); \ | 352 istate->set_osr_buf((address)buf); \ |
351 istate->set_osr_entry(osr_nmethod->osr_entry()); \ | 353 istate->set_osr_entry(osr_nmethod->osr_entry()); \ |
352 return; \ | 354 return; \ |
353 } \ | 355 } \ |
416 CACHE_TOS(); \ | 418 CACHE_TOS(); \ |
417 CACHE_PC(); \ | 419 CACHE_PC(); \ |
418 CACHE_CP(); \ | 420 CACHE_CP(); \ |
419 CACHE_LOCALS(); | 421 CACHE_LOCALS(); |
420 | 422 |
421 // Call the VM don't check for pending exceptions | 423 // Call the VM with last java frame only. |
422 #define CALL_VM_NOCHECK(func) \ | 424 #define CALL_VM_NAKED_LJF(func) \ |
423 DECACHE_STATE(); \ | 425 DECACHE_STATE(); \ |
424 SET_LAST_JAVA_FRAME(); \ | 426 SET_LAST_JAVA_FRAME(); \ |
425 func; \ | 427 func; \ |
426 RESET_LAST_JAVA_FRAME(); \ | 428 RESET_LAST_JAVA_FRAME(); \ |
427 CACHE_STATE(); \ | 429 CACHE_STATE(); |
430 | |
431 // Call the VM. Don't check for pending exceptions. | |
432 #define CALL_VM_NOCHECK(func) \ | |
433 CALL_VM_NAKED_LJF(func) \ | |
428 if (THREAD->pop_frame_pending() && \ | 434 if (THREAD->pop_frame_pending() && \ |
429 !THREAD->pop_frame_in_process()) { \ | 435 !THREAD->pop_frame_in_process()) { \ |
430 goto handle_Pop_Frame; \ | 436 goto handle_Pop_Frame; \ |
431 } \ | 437 } \ |
432 if (THREAD->jvmti_thread_state() && \ | 438 if (THREAD->jvmti_thread_state() && \ |
2700 ttyLocker ttyl; | 2706 ttyLocker ttyl; |
2701 ResourceMark rm; | 2707 ResourceMark rm; |
2702 tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")", except_oop->print_value_string(), except_oop()); | 2708 tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")", except_oop->print_value_string(), except_oop()); |
2703 tty->print_cr(" thrown in interpreter method <%s>", METHOD->print_value_string()); | 2709 tty->print_cr(" thrown in interpreter method <%s>", METHOD->print_value_string()); |
2704 tty->print_cr(" at bci %d, continuing at %d for thread " INTPTR_FORMAT, | 2710 tty->print_cr(" at bci %d, continuing at %d for thread " INTPTR_FORMAT, |
2705 pc - (intptr_t)METHOD->code_base(), | 2711 istate->bcp() - (intptr_t)METHOD->code_base(), |
2706 continuation_bci, THREAD); | 2712 continuation_bci, THREAD); |
2707 } | 2713 } |
2708 // for AbortVMOnException flag | 2714 // for AbortVMOnException flag |
2709 NOT_PRODUCT(Exceptions::debug_check_abort(except_oop)); | 2715 NOT_PRODUCT(Exceptions::debug_check_abort(except_oop)); |
2710 goto run; | 2716 goto run; |
2713 ttyLocker ttyl; | 2719 ttyLocker ttyl; |
2714 ResourceMark rm; | 2720 ResourceMark rm; |
2715 tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")", except_oop->print_value_string(), except_oop()); | 2721 tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")", except_oop->print_value_string(), except_oop()); |
2716 tty->print_cr(" thrown in interpreter method <%s>", METHOD->print_value_string()); | 2722 tty->print_cr(" thrown in interpreter method <%s>", METHOD->print_value_string()); |
2717 tty->print_cr(" at bci %d, unwinding for thread " INTPTR_FORMAT, | 2723 tty->print_cr(" at bci %d, unwinding for thread " INTPTR_FORMAT, |
2718 pc - (intptr_t) METHOD->code_base(), | 2724 istate->bcp() - (intptr_t)METHOD->code_base(), |
2719 THREAD); | 2725 THREAD); |
2720 } | 2726 } |
2721 // for AbortVMOnException flag | 2727 // for AbortVMOnException flag |
2722 NOT_PRODUCT(Exceptions::debug_check_abort(except_oop)); | 2728 NOT_PRODUCT(Exceptions::debug_check_abort(except_oop)); |
2723 // No handler in this activation, unwind and try again | 2729 // No handler in this activation, unwind and try again |