comparison src/cpu/x86/vm/frame_x86.cpp @ 13432:c586f8a7322f

8028412: AsyncGetCallTrace() is broken on x86 in JDK 7u40 Reviewed-by: kvn, sspitsyn
author mgronlun
date Thu, 05 Dec 2013 12:35:38 +0100
parents 190899198332
children 02f27ecb4f3a d3f14809b051 78bbf4d43a14
comparison
equal deleted inserted replaced
13431:a4f036ef52e8 13432:c586f8a7322f
92 // First check if frame is complete and tester is reliable 92 // First check if frame is complete and tester is reliable
93 // Unfortunately we can only check frame complete for runtime stubs and nmethod 93 // Unfortunately we can only check frame complete for runtime stubs and nmethod
94 // other generic buffer blobs are more problematic so we just assume they are 94 // other generic buffer blobs are more problematic so we just assume they are
95 // ok. adapter blobs never have a frame complete and are never ok. 95 // ok. adapter blobs never have a frame complete and are never ok.
96 96
97 // check for a valid frame_size, otherwise we are unlikely to get a valid sender_pc
98
99 if (!Interpreter::contains(_pc) && _cb->frame_size() <= 0) {
100 //assert(0, "Invalid frame_size");
101 return false;
102 }
103
104 if (!_cb->is_frame_complete_at(_pc)) { 97 if (!_cb->is_frame_complete_at(_pc)) {
105 if (_cb->is_nmethod() || _cb->is_adapter_blob() || _cb->is_runtime_stub()) { 98 if (_cb->is_nmethod() || _cb->is_adapter_blob() || _cb->is_runtime_stub()) {
106 return false; 99 return false;
107 } 100 }
108 } 101 }
141 sender_sp = (intptr_t*) addr_at(sender_sp_offset); 134 sender_sp = (intptr_t*) addr_at(sender_sp_offset);
142 135
143 } else { 136 } else {
144 // must be some sort of compiled/runtime frame 137 // must be some sort of compiled/runtime frame
145 // fp does not have to be safe (although it could be check for c1?) 138 // fp does not have to be safe (although it could be check for c1?)
139
140 // check for a valid frame_size, otherwise we are unlikely to get a valid sender_pc
141 if (_cb->frame_size() <= 0) {
142 return false;
143 }
146 144
147 sender_sp = _unextended_sp + _cb->frame_size(); 145 sender_sp = _unextended_sp + _cb->frame_size();
148 // On Intel the return_address is always the word on the stack 146 // On Intel the return_address is always the word on the stack
149 sender_pc = (address) *(sender_sp-1); 147 sender_pc = (address) *(sender_sp-1);
150 } 148 }