< prev index next >

src/hotspot/share/code/debugInfoRec.cpp

Print this page

127 
128   _prev_safepoint_pc = PcDesc::lower_offset_limit;
129 
130   _stream = new DebugInfoWriteStream(this, 10 * K);
131   // make sure that there is no stream_decode_offset that is zero
132   _stream->write_byte((jbyte)0xFF);
133 
134   // make sure that we can distinguish the value "serialized_null" from offsets
135   assert(_stream->position() > serialized_null, "sanity");
136 
137   _oop_recorder = oop_recorder;
138 
139   _all_chunks    = new GrowableArray<DIR_Chunk*>(300);
140   _next_chunk = _next_chunk_limit = nullptr;
141 
142   add_new_pc_offset(PcDesc::lower_offset_limit);  // sentinel record
143 
144   debug_only(_recording_state = rs_null);
145 }
146 






















147 
148 void DebugInformationRecorder::add_oopmap(int pc_offset, OopMap* map) {
149   // !!!!! Preserve old style handling of oopmaps for now
150   _oopmaps->add_gc_map(pc_offset, map);
151 }
152 
153 void DebugInformationRecorder::add_safepoint(int pc_offset, OopMap* map) {
154   assert(!_oop_recorder->is_complete(), "not frozen yet");
155   // Store the new safepoint
156 
157   // Add the oop map
158   add_oopmap(pc_offset, map);
159 
160   add_new_pc_offset(pc_offset);
161 
162   assert(_recording_state == rs_null, "nesting of recording calls");
163   debug_only(_recording_state = rs_safepoint);
164 }
165 
166 void DebugInformationRecorder::add_non_safepoint(int pc_offset) {

127 
128   _prev_safepoint_pc = PcDesc::lower_offset_limit;
129 
130   _stream = new DebugInfoWriteStream(this, 10 * K);
131   // make sure that there is no stream_decode_offset that is zero
132   _stream->write_byte((jbyte)0xFF);
133 
134   // make sure that we can distinguish the value "serialized_null" from offsets
135   assert(_stream->position() > serialized_null, "sanity");
136 
137   _oop_recorder = oop_recorder;
138 
139   _all_chunks    = new GrowableArray<DIR_Chunk*>(300);
140   _next_chunk = _next_chunk_limit = nullptr;
141 
142   add_new_pc_offset(PcDesc::lower_offset_limit);  // sentinel record
143 
144   debug_only(_recording_state = rs_null);
145 }
146 
147 DebugInformationRecorder::DebugInformationRecorder(OopRecorder* oop_recorder, int data_size, int pcs_length)
148   : _recording_non_safepoints(compute_recording_non_safepoints())
149 {
150   _pcs_size   = _pcs_length = pcs_length;
151   _pcs        = NEW_RESOURCE_ARRAY(PcDesc, _pcs_size);
152 
153   _prev_safepoint_pc = PcDesc::lower_offset_limit;
154 
155   _stream = new DebugInfoWriteStream(this, data_size);
156   // make sure that there is no stream_decode_offset that is zero
157   _stream->write_byte((jbyte)0xFF);
158 
159   // make sure that we can distinguish the value "serialized_null" from offsets
160   assert(_stream->position() > serialized_null, "sanity");
161 
162   _oop_recorder = oop_recorder;
163 
164   _all_chunks = nullptr;
165   _next_chunk = _next_chunk_limit = nullptr;
166 
167   debug_only(_recording_state = rs_null);
168 }
169 
170 void DebugInformationRecorder::add_oopmap(int pc_offset, OopMap* map) {
171   // !!!!! Preserve old style handling of oopmaps for now
172   _oopmaps->add_gc_map(pc_offset, map);
173 }
174 
175 void DebugInformationRecorder::add_safepoint(int pc_offset, OopMap* map) {
176   assert(!_oop_recorder->is_complete(), "not frozen yet");
177   // Store the new safepoint
178 
179   // Add the oop map
180   add_oopmap(pc_offset, map);
181 
182   add_new_pc_offset(pc_offset);
183 
184   assert(_recording_state == rs_null, "nesting of recording calls");
185   debug_only(_recording_state = rs_safepoint);
186 }
187 
188 void DebugInformationRecorder::add_non_safepoint(int pc_offset) {
< prev index next >