60 assert(pc != NULL, "no pc?");
61 _cb = CodeCache::find_blob(pc);
62 adjust_unextended_sp();
63
64 address original_pc = nmethod::get_deopt_original_pc(this);
65 if (original_pc != NULL) {
66 _pc = original_pc;
67 _deopt_state = is_deoptimized;
68 } else {
69 _deopt_state = not_deoptimized;
70 }
71 }
72
73 inline frame::frame(intptr_t* sp, intptr_t* fp, address pc) {
74 init(sp, fp, pc);
75 }
76
77 inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc) {
78 intptr_t a = intptr_t(sp);
79 intptr_t b = intptr_t(fp);
80 #ifndef PRODUCT
81 if (fp)
82 if (sp > fp || (fp - sp > 0x100000))
83 for(;;)
84 asm("nop");
85 #endif
86 _sp = sp;
87 _unextended_sp = unextended_sp;
88 _fp = fp;
89 _pc = pc;
90 assert(pc != NULL, "no pc?");
91 _cb = CodeCache::find_blob(pc);
92 adjust_unextended_sp();
93
94 address original_pc = nmethod::get_deopt_original_pc(this);
95 if (original_pc != NULL) {
96 _pc = original_pc;
97 assert(((nmethod*)_cb)->insts_contains(_pc), "original PC must be in nmethod");
98 _deopt_state = is_deoptimized;
99 } else {
100 _deopt_state = not_deoptimized;
101 }
102 }
103
104 inline frame::frame(intptr_t* sp, intptr_t* fp) {
105 intptr_t a = intptr_t(sp);
106 intptr_t b = intptr_t(fp);
107 #ifndef PRODUCT
108 if (fp)
109 if (sp > fp || (fp - sp > 0x100000))
110 for(;;)
111 asm("nop");
112 #endif
113 _sp = sp;
114 _unextended_sp = sp;
115 _fp = fp;
116 _pc = (address)(sp[-1]);
117
118 // Here's a sticky one. This constructor can be called via AsyncGetCallTrace
119 // when last_Java_sp is non-null but the pc fetched is junk. If we are truly
120 // unlucky the junk value could be to a zombied method and we'll die on the
121 // find_blob call. This is also why we can have no asserts on the validity
122 // of the pc we find here. AsyncGetCallTrace -> pd_get_top_frame_for_signal_handler
123 // -> pd_last_frame should use a specialized version of pd_last_frame which could
124 // call a specilaized frame constructor instead of this one.
125 // Then we could use the assert below. However this assert is of somewhat dubious
126 // value.
127 // assert(_pc != NULL, "no pc?");
|
60 assert(pc != NULL, "no pc?");
61 _cb = CodeCache::find_blob(pc);
62 adjust_unextended_sp();
63
64 address original_pc = nmethod::get_deopt_original_pc(this);
65 if (original_pc != NULL) {
66 _pc = original_pc;
67 _deopt_state = is_deoptimized;
68 } else {
69 _deopt_state = not_deoptimized;
70 }
71 }
72
73 inline frame::frame(intptr_t* sp, intptr_t* fp, address pc) {
74 init(sp, fp, pc);
75 }
76
77 inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc) {
78 intptr_t a = intptr_t(sp);
79 intptr_t b = intptr_t(fp);
80 // C2 may use fp as a general reg - C1 doesn't
81 #if !defined(PRODUCT) && !defined(COMPILER2)
82 if (fp)
83 if (sp > fp || (fp - sp > 0x100000))
84 for(;;)
85 asm("nop");
86 #endif
87 _sp = sp;
88 _unextended_sp = unextended_sp;
89 _fp = fp;
90 _pc = pc;
91 assert(pc != NULL, "no pc?");
92 _cb = CodeCache::find_blob(pc);
93 adjust_unextended_sp();
94
95 address original_pc = nmethod::get_deopt_original_pc(this);
96 if (original_pc != NULL) {
97 _pc = original_pc;
98 assert(((nmethod*)_cb)->insts_contains(_pc), "original PC must be in nmethod");
99 _deopt_state = is_deoptimized;
100 } else {
101 _deopt_state = not_deoptimized;
102 }
103 }
104
105 inline frame::frame(intptr_t* sp, intptr_t* fp) {
106 intptr_t a = intptr_t(sp);
107 intptr_t b = intptr_t(fp);
108 // C2 may use fp as a general reg - C1 doesn't
109 #if !defined(PRODUCT) && !defined(COMPILER2)
110 if (fp)
111 if (sp > fp || (fp - sp > 0x100000))
112 for(;;)
113 asm("nop");
114 #endif
115 _sp = sp;
116 _unextended_sp = sp;
117 _fp = fp;
118 _pc = (address)(sp[-1]);
119
120 // Here's a sticky one. This constructor can be called via AsyncGetCallTrace
121 // when last_Java_sp is non-null but the pc fetched is junk. If we are truly
122 // unlucky the junk value could be to a zombied method and we'll die on the
123 // find_blob call. This is also why we can have no asserts on the validity
124 // of the pc we find here. AsyncGetCallTrace -> pd_get_top_frame_for_signal_handler
125 // -> pd_last_frame should use a specialized version of pd_last_frame which could
126 // call a specilaized frame constructor instead of this one.
127 // Then we could use the assert below. However this assert is of somewhat dubious
128 // value.
129 // assert(_pc != NULL, "no pc?");
|