13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "code/debugInfoRec.hpp" 27 #include "code/pcDesc.hpp" 28 #include "code/scopeDesc.hpp" 29 #include "memory/resourceArea.hpp" 30 #include "oops/oop.inline.hpp" 31 #include "runtime/handles.inline.hpp" 32 33 ScopeDesc::ScopeDesc(const CompiledMethod* code, int decode_offset, int obj_decode_offset, bool reexecute, bool rethrow_exception, bool return_oop) { 34 _code = code; 35 _decode_offset = decode_offset; 36 _objects = decode_object_values(obj_decode_offset); 37 _reexecute = reexecute; 38 _rethrow_exception = rethrow_exception; 39 _return_oop = return_oop; 40 decode_body(); 41 } 42 43 ScopeDesc::ScopeDesc(const CompiledMethod* code, int decode_offset, bool reexecute, bool rethrow_exception, bool return_oop) { 44 _code = code; 45 _decode_offset = decode_offset; 46 _objects = decode_object_values(DebugInformationRecorder::serialized_null); 47 _reexecute = reexecute; 48 _rethrow_exception = rethrow_exception; 49 _return_oop = return_oop; 50 decode_body(); 51 } 52 53 54 void ScopeDesc::initialize(const ScopeDesc* parent, int decode_offset) { 55 _code = parent->_code; 56 _decode_offset = decode_offset; 57 _objects = parent->_objects; 58 _reexecute = false; //reexecute only applies to the first scope 59 _rethrow_exception = false; 60 _return_oop = false; 61 decode_body(); 62 } 63 64 ScopeDesc::ScopeDesc(const ScopeDesc* parent) { 65 initialize(parent, parent->_sender_decode_offset); 66 } 67 68 ScopeDesc::ScopeDesc(const ScopeDesc* parent, int decode_offset) { 69 initialize(parent, decode_offset); 70 } 71 72 73 void ScopeDesc::decode_body() { 74 if (decode_offset() == DebugInformationRecorder::serialized_null) { 75 // This is a sentinel record, which is only relevant to 76 // approximate queries. Decode a reasonable frame. 77 _sender_decode_offset = DebugInformationRecorder::serialized_null; 78 _method = _code->method(); 79 _bci = InvocationEntryBci; 80 _locals_decode_offset = DebugInformationRecorder::serialized_null; | 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "code/debugInfoRec.hpp" 27 #include "code/pcDesc.hpp" 28 #include "code/scopeDesc.hpp" 29 #include "memory/resourceArea.hpp" 30 #include "oops/oop.inline.hpp" 31 #include "runtime/handles.inline.hpp" 32 33 ScopeDesc::ScopeDesc(const CompiledMethod* code, int decode_offset, int obj_decode_offset, bool reexecute, bool rethrow_exception, bool return_oop, bool return_vt) { 34 _code = code; 35 _decode_offset = decode_offset; 36 _objects = decode_object_values(obj_decode_offset); 37 _reexecute = reexecute; 38 _rethrow_exception = rethrow_exception; 39 _return_oop = return_oop; 40 _return_vt = return_vt; 41 decode_body(); 42 } 43 44 ScopeDesc::ScopeDesc(const CompiledMethod* code, int decode_offset, bool reexecute, bool rethrow_exception, bool return_oop, bool return_vt) { 45 _code = code; 46 _decode_offset = decode_offset; 47 _objects = decode_object_values(DebugInformationRecorder::serialized_null); 48 _reexecute = reexecute; 49 _rethrow_exception = rethrow_exception; 50 _return_oop = return_oop; 51 _return_vt = return_vt; 52 decode_body(); 53 } 54 55 56 void ScopeDesc::initialize(const ScopeDesc* parent, int decode_offset) { 57 _code = parent->_code; 58 _decode_offset = decode_offset; 59 _objects = parent->_objects; 60 _reexecute = false; //reexecute only applies to the first scope 61 _rethrow_exception = false; 62 _return_oop = false; 63 _return_vt = false; 64 decode_body(); 65 } 66 67 ScopeDesc::ScopeDesc(const ScopeDesc* parent) { 68 initialize(parent, parent->_sender_decode_offset); 69 } 70 71 ScopeDesc::ScopeDesc(const ScopeDesc* parent, int decode_offset) { 72 initialize(parent, decode_offset); 73 } 74 75 76 void ScopeDesc::decode_body() { 77 if (decode_offset() == DebugInformationRecorder::serialized_null) { 78 // This is a sentinel record, which is only relevant to 79 // approximate queries. Decode a reasonable frame. 80 _sender_decode_offset = DebugInformationRecorder::serialized_null; 81 _method = _code->method(); 82 _bci = InvocationEntryBci; 83 _locals_decode_offset = DebugInformationRecorder::serialized_null; |