< prev index next >

src/hotspot/share/code/debugInfoRec.cpp

Print this page

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






















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

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