57 } else {
58 _deopt_state = not_deoptimized;
59 }
60 }
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 = CompiledMethod::get_deopt_original_pc(this);
76 if (original_pc != NULL) {
77 _pc = original_pc;
78 assert(_cb->as_compiled_method()->insts_contains_inclusive(_pc),
79 "original PC must be in the main code section of the the compiled method (or must be immediately following it)");
80 _deopt_state = is_deoptimized;
81 } else {
82 if (_cb->is_deoptimization_stub()) {
83 _deopt_state = is_deoptimized;
84 } else {
85 _deopt_state = not_deoptimized;
86 }
87 }
88 }
89
90 inline frame::frame(intptr_t* sp, intptr_t* fp) {
91 _sp = sp;
92 _unextended_sp = sp;
93 _fp = fp;
94 _pc = (address)(sp[-1]);
95
96 // Here's a sticky one. This constructor can be called via AsyncGetCallTrace
97 // when last_Java_sp is non-null but the pc fetched is junk. If we are truly
98 // unlucky the junk value could be to a zombied method and we'll die on the
99 // find_blob call. This is also why we can have no asserts on the validity
100 // of the pc we find here. AsyncGetCallTrace -> pd_get_top_frame_for_signal_handler
101 // -> pd_last_frame should use a specialized version of pd_last_frame which could
|
57 } else {
58 _deopt_state = not_deoptimized;
59 }
60 }
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 = CompiledMethod::get_deopt_original_pc(this);
76 if (original_pc != NULL) {
77 assert(_cb != NULL, "no cb 1 pc: %p orig_pc: %p", pc, original_pc);
78 _pc = original_pc;
79 assert(_cb->as_compiled_method()->insts_contains_inclusive(_pc),
80 "original PC must be in the main code section of the the compiled method (or must be immediately following it)");
81 _deopt_state = is_deoptimized;
82 } else {
83 assert(_cb != NULL, "no cb 2 sp: %p usp: %p fp: %p pc: %p orig_pc: %p", sp, unextended_sp, fp, pc, original_pc);
84 if (_cb->is_deoptimization_stub()) {
85 _deopt_state = is_deoptimized;
86 } else {
87 _deopt_state = not_deoptimized;
88 }
89 }
90 }
91
92 inline frame::frame(intptr_t* sp, intptr_t* fp) {
93 _sp = sp;
94 _unextended_sp = sp;
95 _fp = fp;
96 _pc = (address)(sp[-1]);
97
98 // Here's a sticky one. This constructor can be called via AsyncGetCallTrace
99 // when last_Java_sp is non-null but the pc fetched is junk. If we are truly
100 // unlucky the junk value could be to a zombied method and we'll die on the
101 // find_blob call. This is also why we can have no asserts on the validity
102 // of the pc we find here. AsyncGetCallTrace -> pd_get_top_frame_for_signal_handler
103 // -> pd_last_frame should use a specialized version of pd_last_frame which could
|