61 62 inline frame::frame(intptr_t* sp, intptr_t* fp, address pc) { 63 init(sp, fp, pc); 64 } 65 66 inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc) { 67 _sp = sp; 68 _unextended_sp = unextended_sp; 69 _fp = fp; 70 _pc = pc; 71 assert(pc != NULL, "no pc?"); 72 _cb = CodeCache::find_blob(pc); 73 adjust_unextended_sp(); 74 75 address original_pc = nmethod::get_deopt_original_pc(this); 76 if (original_pc != NULL) { 77 _pc = original_pc; 78 assert(((nmethod*)_cb)->insts_contains(_pc), "original PC must be in nmethod"); 79 _deopt_state = is_deoptimized; 80 } else { 81 _deopt_state = not_deoptimized; 82 } 83 } 84 85 inline frame::frame(intptr_t* sp, intptr_t* fp) { 86 _sp = sp; 87 _unextended_sp = sp; 88 _fp = fp; 89 _pc = (address)(sp[-1]); 90 91 // Here's a sticky one. This constructor can be called via AsyncGetCallTrace 92 // when last_Java_sp is non-null but the pc fetched is junk. If we are truly 93 // unlucky the junk value could be to a zombied method and we'll die on the 94 // find_blob call. This is also why we can have no asserts on the validity 95 // of the pc we find here. AsyncGetCallTrace -> pd_get_top_frame_for_signal_handler 96 // -> pd_last_frame should use a specialized version of pd_last_frame which could 97 // call a specialized frame constructor instead of this one. 98 // Then we could use the assert below. However this assert is of somewhat dubious 99 // value. 100 // assert(_pc != NULL, "no pc?"); 101 102 _cb = CodeCache::find_blob(_pc); | 61 62 inline frame::frame(intptr_t* sp, intptr_t* fp, address pc) { 63 init(sp, fp, pc); 64 } 65 66 inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc) { 67 _sp = sp; 68 _unextended_sp = unextended_sp; 69 _fp = fp; 70 _pc = pc; 71 assert(pc != NULL, "no pc?"); 72 _cb = CodeCache::find_blob(pc); 73 adjust_unextended_sp(); 74 75 address original_pc = nmethod::get_deopt_original_pc(this); 76 if (original_pc != NULL) { 77 _pc = original_pc; 78 assert(((nmethod*)_cb)->insts_contains(_pc), "original PC must be in nmethod"); 79 _deopt_state = is_deoptimized; 80 } else { 81 if (_cb->is_deoptimization_stub()) { 82 _deopt_state = is_deoptimized; 83 } else { 84 _deopt_state = not_deoptimized; 85 } 86 } 87 } 88 89 inline frame::frame(intptr_t* sp, intptr_t* fp) { 90 _sp = sp; 91 _unextended_sp = sp; 92 _fp = fp; 93 _pc = (address)(sp[-1]); 94 95 // Here's a sticky one. This constructor can be called via AsyncGetCallTrace 96 // when last_Java_sp is non-null but the pc fetched is junk. If we are truly 97 // unlucky the junk value could be to a zombied method and we'll die on the 98 // find_blob call. This is also why we can have no asserts on the validity 99 // of the pc we find here. AsyncGetCallTrace -> pd_get_top_frame_for_signal_handler 100 // -> pd_last_frame should use a specialized version of pd_last_frame which could 101 // call a specialized frame constructor instead of this one. 102 // Then we could use the assert below. However this assert is of somewhat dubious 103 // value. 104 // assert(_pc != NULL, "no pc?"); 105 106 _cb = CodeCache::find_blob(_pc); |