24 |
24 |
25 # include "incls/_precompiled.incl" |
25 # include "incls/_precompiled.incl" |
26 # include "incls/_scopeDesc.cpp.incl" |
26 # include "incls/_scopeDesc.cpp.incl" |
27 |
27 |
28 |
28 |
29 ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset, int obj_decode_offset) { |
29 ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset, int obj_decode_offset, bool reexecute) { |
30 _code = code; |
30 _code = code; |
31 _decode_offset = decode_offset; |
31 _decode_offset = decode_offset; |
32 _objects = decode_object_values(obj_decode_offset); |
32 _objects = decode_object_values(obj_decode_offset); |
|
33 _reexecute = reexecute; |
33 decode_body(); |
34 decode_body(); |
34 } |
35 } |
35 |
36 |
36 ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset) { |
37 ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset, bool reexecute) { |
37 _code = code; |
38 _code = code; |
38 _decode_offset = decode_offset; |
39 _decode_offset = decode_offset; |
39 _objects = decode_object_values(DebugInformationRecorder::serialized_null); |
40 _objects = decode_object_values(DebugInformationRecorder::serialized_null); |
|
41 _reexecute = reexecute; |
40 decode_body(); |
42 decode_body(); |
41 } |
43 } |
42 |
44 |
43 |
45 |
44 ScopeDesc::ScopeDesc(const ScopeDesc* parent) { |
46 ScopeDesc::ScopeDesc(const ScopeDesc* parent) { |
45 _code = parent->_code; |
47 _code = parent->_code; |
46 _decode_offset = parent->_sender_decode_offset; |
48 _decode_offset = parent->_sender_decode_offset; |
47 _objects = parent->_objects; |
49 _objects = parent->_objects; |
|
50 _reexecute = false; //reexecute only applies to the first scope |
48 decode_body(); |
51 decode_body(); |
49 assert(_reexecute == false, "reexecute not allowed"); |
|
50 } |
52 } |
51 |
53 |
52 |
54 |
53 void ScopeDesc::decode_body() { |
55 void ScopeDesc::decode_body() { |
54 if (decode_offset() == DebugInformationRecorder::serialized_null) { |
56 if (decode_offset() == DebugInformationRecorder::serialized_null) { |
55 // This is a sentinel record, which is only relevant to |
57 // This is a sentinel record, which is only relevant to |
56 // approximate queries. Decode a reasonable frame. |
58 // approximate queries. Decode a reasonable frame. |
57 _sender_decode_offset = DebugInformationRecorder::serialized_null; |
59 _sender_decode_offset = DebugInformationRecorder::serialized_null; |
58 _method = methodHandle(_code->method()); |
60 _method = methodHandle(_code->method()); |
59 _bci = InvocationEntryBci; |
61 _bci = InvocationEntryBci; |
60 _reexecute = false; |
|
61 _locals_decode_offset = DebugInformationRecorder::serialized_null; |
62 _locals_decode_offset = DebugInformationRecorder::serialized_null; |
62 _expressions_decode_offset = DebugInformationRecorder::serialized_null; |
63 _expressions_decode_offset = DebugInformationRecorder::serialized_null; |
63 _monitors_decode_offset = DebugInformationRecorder::serialized_null; |
64 _monitors_decode_offset = DebugInformationRecorder::serialized_null; |
64 } else { |
65 } else { |
65 // decode header |
66 // decode header |
66 DebugInfoReadStream* stream = stream_at(decode_offset()); |
67 DebugInfoReadStream* stream = stream_at(decode_offset()); |
67 |
68 |
68 _sender_decode_offset = stream->read_int(); |
69 _sender_decode_offset = stream->read_int(); |
69 _method = methodHandle((methodOop) stream->read_oop()); |
70 _method = methodHandle((methodOop) stream->read_oop()); |
70 _bci = stream->read_bci_and_reexecute(_reexecute); |
71 _bci = stream->read_bci(); |
71 |
72 |
72 // decode offsets for body and sender |
73 // decode offsets for body and sender |
73 _locals_decode_offset = stream->read_int(); |
74 _locals_decode_offset = stream->read_int(); |
74 _expressions_decode_offset = stream->read_int(); |
75 _expressions_decode_offset = stream->read_int(); |
75 _monitors_decode_offset = stream->read_int(); |
76 _monitors_decode_offset = stream->read_int(); |