src/cpu/sparc/vm/frame_sparc.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6930772 Cdiff src/cpu/sparc/vm/frame_sparc.cpp

src/cpu/sparc/vm/frame_sparc.cpp

Print this page

        

*** 334,346 **** assert(!((nmethod*)_cb)->is_deopt_pc(_pc), "invariant broken"); } #endif // ASSERT } ! frame::frame(intptr_t* sp, intptr_t* younger_sp, bool younger_frame_adjusted_stack) { ! _sp = sp; ! _younger_sp = younger_sp; if (younger_sp == NULL) { // make a deficient frame which doesn't know where its PC is _pc = NULL; _cb = NULL; } else { --- 334,348 ---- assert(!((nmethod*)_cb)->is_deopt_pc(_pc), "invariant broken"); } #endif // ASSERT } ! frame::frame(intptr_t* sp, intptr_t* younger_sp, bool younger_frame_is_interpreted) : ! _sp(sp), ! _younger_sp(younger_sp), ! _deopt_state(unknown), ! _sp_adjustment_by_callee(0) { if (younger_sp == NULL) { // make a deficient frame which doesn't know where its PC is _pc = NULL; _cb = NULL; } else {
*** 350,373 **** // find_blob_unsafe // In case of native stubs, the pc retrieved here might be // wrong. (the _last_native_pc will have the right value) // So do not put add any asserts on the _pc here. } ! if (younger_frame_adjusted_stack) { ! // compute adjustment to this frame's SP made by its interpreted callee ! _sp_adjustment_by_callee = (intptr_t*)((intptr_t)younger_sp[I5_savedSP->sp_offset_in_saved_window()] + ! STACK_BIAS) - sp; ! } else { ! _sp_adjustment_by_callee = 0; } ! _deopt_state = unknown; ! // It is important that frame be fully construct when we do this lookup ! // as get_original_pc() needs correct value for unextended_sp() if (_pc != NULL) { - _cb = CodeCache::find_blob(_pc); address original_pc = nmethod::get_deopt_original_pc(this); if (original_pc != NULL) { _pc = original_pc; _deopt_state = is_deoptimized; } else { --- 352,387 ---- // find_blob_unsafe // In case of native stubs, the pc retrieved here might be // wrong. (the _last_native_pc will have the right value) // So do not put add any asserts on the _pc here. } ! ! if (_pc != NULL) ! _cb = CodeCache::find_blob(_pc); ! ! // Check for MethodHandle call sites. ! if (_cb != NULL) { ! nmethod* nm = _cb->as_nmethod_or_null(); ! if (nm != NULL) { ! if (nm->is_deopt_mh_entry(_pc) || nm->is_method_handle_return(_pc)) { ! _sp_adjustment_by_callee = (intptr_t*) ((intptr_t) sp[L7_mh_SP_save->sp_offset_in_saved_window()] + STACK_BIAS) - sp; ! // The SP is already adjusted by this MH call site, don't ! // overwrite this value with the wrong interpreter value. ! younger_frame_is_interpreted = false; ! } ! } } ! if (younger_frame_is_interpreted) { ! // compute adjustment to this frame's SP made by its interpreted callee ! _sp_adjustment_by_callee = (intptr_t*) ((intptr_t) younger_sp[I5_savedSP->sp_offset_in_saved_window()] + STACK_BIAS) - sp; ! } ! // It is important that the frame is fully constructed when we do ! // this lookup as get_deopt_original_pc() needs a correct value for ! // unextended_sp() which uses _sp_adjustment_by_callee. if (_pc != NULL) { address original_pc = nmethod::get_deopt_original_pc(this); if (original_pc != NULL) { _pc = original_pc; _deopt_state = is_deoptimized; } else {
*** 462,472 **** if (is_entry_frame()) return sender_for_entry_frame(map); intptr_t* younger_sp = sp(); intptr_t* sp = sender_sp(); - bool adjusted_stack = false; // Note: The version of this operation on any platform with callee-save // registers must update the register map (if not null). // In order to do this correctly, the various subtypes of // of frame (interpreted, compiled, glue, native), --- 476,485 ----
*** 481,492 **** // The constructor of the sender must know whether this frame is interpreted so it can set the // sender's _sp_adjustment_by_callee field. An osr adapter frame was originally // interpreted but its pc is in the code cache (for c1 -> osr_frame_return_id stub), so it must be // explicitly recognized. ! adjusted_stack = is_interpreted_frame(); ! if (adjusted_stack) { map->make_integer_regs_unsaved(); map->shift_window(sp, younger_sp); } else if (_cb != NULL) { // Update the locations of implicitly saved registers to be their // addresses in the register save area. --- 494,505 ---- // The constructor of the sender must know whether this frame is interpreted so it can set the // sender's _sp_adjustment_by_callee field. An osr adapter frame was originally // interpreted but its pc is in the code cache (for c1 -> osr_frame_return_id stub), so it must be // explicitly recognized. ! bool frame_is_interpreted = is_interpreted_frame(); ! if (frame_is_interpreted) { map->make_integer_regs_unsaved(); map->shift_window(sp, younger_sp); } else if (_cb != NULL) { // Update the locations of implicitly saved registers to be their // addresses in the register save area.
*** 501,511 **** if (_cb->oop_maps() != NULL) { OopMapSet::update_register_map(this, map); } } } ! return frame(sp, younger_sp, adjusted_stack); } void frame::patch_pc(Thread* thread, address pc) { if(thread == Thread::current()) { --- 514,524 ---- if (_cb->oop_maps() != NULL) { OopMapSet::update_register_map(this, map); } } } ! return frame(sp, younger_sp, frame_is_interpreted); } void frame::patch_pc(Thread* thread, address pc) { if(thread == Thread::current()) {
src/cpu/sparc/vm/frame_sparc.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File