Mercurial > hg > graal-jvmci-8
comparison src/share/vm/code/debugInfoRec.cpp @ 5129:51111665eda6
Support for recording a leaf graph id for each deoptimization point in the debug info.
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Wed, 21 Mar 2012 10:47:02 +0100 |
parents | 597bc897257d |
children | 957c266d8bc5 |
comparison
equal
deleted
inserted
replaced
5128:e2da6471a9a1 | 5129:51111665eda6 |
---|---|
125 void DebugInformationRecorder::add_oopmap(int pc_offset, OopMap* map) { | 125 void DebugInformationRecorder::add_oopmap(int pc_offset, OopMap* map) { |
126 // !!!!! Preserve old style handling of oopmaps for now | 126 // !!!!! Preserve old style handling of oopmaps for now |
127 _oopmaps->add_gc_map(pc_offset, map); | 127 _oopmaps->add_gc_map(pc_offset, map); |
128 } | 128 } |
129 | 129 |
130 void DebugInformationRecorder::add_safepoint(int pc_offset, OopMap* map) { | 130 void DebugInformationRecorder::add_safepoint(int pc_offset, jlong leaf_graph_id, OopMap* map) { |
131 assert(!_oop_recorder->is_complete(), "not frozen yet"); | 131 assert(!_oop_recorder->is_complete(), "not frozen yet"); |
132 // Store the new safepoint | 132 // Store the new safepoint |
133 | 133 |
134 // Add the oop map | 134 // Add the oop map |
135 add_oopmap(pc_offset, map); | 135 add_oopmap(pc_offset, map); |
136 | 136 |
137 add_new_pc_offset(pc_offset); | 137 add_new_pc_offset(pc_offset, leaf_graph_id); |
138 | 138 |
139 assert(_recording_state == rs_null, "nesting of recording calls"); | 139 assert(_recording_state == rs_null, "nesting of recording calls"); |
140 debug_only(_recording_state = rs_safepoint); | 140 debug_only(_recording_state = rs_safepoint); |
141 } | 141 } |
142 | 142 |
148 | 148 |
149 assert(_recording_state == rs_null, "nesting of recording calls"); | 149 assert(_recording_state == rs_null, "nesting of recording calls"); |
150 debug_only(_recording_state = rs_non_safepoint); | 150 debug_only(_recording_state = rs_non_safepoint); |
151 } | 151 } |
152 | 152 |
153 void DebugInformationRecorder::add_new_pc_offset(int pc_offset) { | 153 void DebugInformationRecorder::add_new_pc_offset(int pc_offset, jlong leaf_graph_id) { |
154 assert(_pcs_length == 0 || last_pc()->pc_offset() < pc_offset, | 154 assert(_pcs_length == 0 || last_pc()->pc_offset() < pc_offset, |
155 "must specify a new, larger pc offset"); | 155 "must specify a new, larger pc offset"); |
156 | 156 |
157 // add the pcdesc | 157 // add the pcdesc |
158 if (_pcs_length == _pcs_size) { | 158 if (_pcs_length == _pcs_size) { |
166 _pcs = new_pcs; | 166 _pcs = new_pcs; |
167 } | 167 } |
168 assert(_pcs_size > _pcs_length, "There must be room for after expanding"); | 168 assert(_pcs_size > _pcs_length, "There must be room for after expanding"); |
169 | 169 |
170 _pcs[_pcs_length++] = PcDesc(pc_offset, DebugInformationRecorder::serialized_null, | 170 _pcs[_pcs_length++] = PcDesc(pc_offset, DebugInformationRecorder::serialized_null, |
171 DebugInformationRecorder::serialized_null); | 171 DebugInformationRecorder::serialized_null, leaf_graph_id); |
172 } | 172 } |
173 | 173 |
174 | 174 |
175 int DebugInformationRecorder::serialize_monitor_values(GrowableArray<MonitorValue*>* monitors) { | 175 int DebugInformationRecorder::serialize_monitor_values(GrowableArray<MonitorValue*>* monitors) { |
176 if (monitors == NULL || monitors->is_empty()) return DebugInformationRecorder::serialized_null; | 176 if (monitors == NULL || monitors->is_empty()) return DebugInformationRecorder::serialized_null; |