< prev index next >

src/hotspot/share/code/scopeDesc.cpp

Print this page

 23  */
 24 
 25 #include "precompiled.hpp"
 26 #include "classfile/javaClasses.inline.hpp"
 27 #include "code/debugInfoRec.hpp"
 28 #include "code/pcDesc.hpp"
 29 #include "code/scopeDesc.hpp"
 30 #include "compiler/compiler_globals.hpp"
 31 #include "memory/resourceArea.hpp"
 32 #include "oops/oop.inline.hpp"
 33 #include "runtime/handles.inline.hpp"
 34 
 35 ScopeDesc::ScopeDesc(const nmethod* code, PcDesc* pd, bool ignore_objects) {
 36   int obj_decode_offset = ignore_objects ? DebugInformationRecorder::serialized_null : pd->obj_decode_offset();
 37   _code          = code;
 38   _decode_offset = pd->scope_decode_offset();
 39   _objects       = decode_object_values(obj_decode_offset);
 40   _reexecute     = pd->should_reexecute();
 41   _rethrow_exception = pd->rethrow_exception();
 42   _return_oop    = pd->return_oop();

 43   _has_ea_local_in_scope = ignore_objects ? false : pd->has_ea_local_in_scope();
 44   _arg_escape    = ignore_objects ? false : pd->arg_escape();
 45   decode_body();
 46 }
 47 
 48 
 49 void ScopeDesc::initialize(const ScopeDesc* parent, int decode_offset) {
 50   _code          = parent->_code;
 51   _decode_offset = decode_offset;
 52   _objects       = parent->_objects;
 53   _reexecute     = false; //reexecute only applies to the first scope
 54   _rethrow_exception = false;
 55   _return_oop    = false;

 56   _has_ea_local_in_scope = parent->has_ea_local_in_scope();
 57   _arg_escape    = false;
 58   decode_body();
 59 }
 60 
 61 ScopeDesc::ScopeDesc(const ScopeDesc* parent) {
 62   initialize(parent, parent->_sender_decode_offset);
 63 }
 64 
 65 ScopeDesc::ScopeDesc(const ScopeDesc* parent, int decode_offset) {
 66   initialize(parent, decode_offset);
 67 }
 68 
 69 
 70 void ScopeDesc::decode_body() {
 71   if (decode_offset() == DebugInformationRecorder::serialized_null) {
 72     // This is a sentinel record, which is only relevant to
 73     // approximate queries.  Decode a reasonable frame.
 74     _sender_decode_offset = DebugInformationRecorder::serialized_null;
 75     _method = _code->method();

 23  */
 24 
 25 #include "precompiled.hpp"
 26 #include "classfile/javaClasses.inline.hpp"
 27 #include "code/debugInfoRec.hpp"
 28 #include "code/pcDesc.hpp"
 29 #include "code/scopeDesc.hpp"
 30 #include "compiler/compiler_globals.hpp"
 31 #include "memory/resourceArea.hpp"
 32 #include "oops/oop.inline.hpp"
 33 #include "runtime/handles.inline.hpp"
 34 
 35 ScopeDesc::ScopeDesc(const nmethod* code, PcDesc* pd, bool ignore_objects) {
 36   int obj_decode_offset = ignore_objects ? DebugInformationRecorder::serialized_null : pd->obj_decode_offset();
 37   _code          = code;
 38   _decode_offset = pd->scope_decode_offset();
 39   _objects       = decode_object_values(obj_decode_offset);
 40   _reexecute     = pd->should_reexecute();
 41   _rethrow_exception = pd->rethrow_exception();
 42   _return_oop    = pd->return_oop();
 43   _return_scalarized = pd->return_scalarized();
 44   _has_ea_local_in_scope = ignore_objects ? false : pd->has_ea_local_in_scope();
 45   _arg_escape    = ignore_objects ? false : pd->arg_escape();
 46   decode_body();
 47 }
 48 
 49 
 50 void ScopeDesc::initialize(const ScopeDesc* parent, int decode_offset) {
 51   _code          = parent->_code;
 52   _decode_offset = decode_offset;
 53   _objects       = parent->_objects;
 54   _reexecute     = false; //reexecute only applies to the first scope
 55   _rethrow_exception = false;
 56   _return_oop    = false;
 57   _return_scalarized = false;
 58   _has_ea_local_in_scope = parent->has_ea_local_in_scope();
 59   _arg_escape    = false;
 60   decode_body();
 61 }
 62 
 63 ScopeDesc::ScopeDesc(const ScopeDesc* parent) {
 64   initialize(parent, parent->_sender_decode_offset);
 65 }
 66 
 67 ScopeDesc::ScopeDesc(const ScopeDesc* parent, int decode_offset) {
 68   initialize(parent, decode_offset);
 69 }
 70 
 71 
 72 void ScopeDesc::decode_body() {
 73   if (decode_offset() == DebugInformationRecorder::serialized_null) {
 74     // This is a sentinel record, which is only relevant to
 75     // approximate queries.  Decode a reasonable frame.
 76     _sender_decode_offset = DebugInformationRecorder::serialized_null;
 77     _method = _code->method();
< prev index next >