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