264 // Searching in _all_chunks is limited to a window,
265 // but searching in _shared_chunks is unlimited.
266 _shared_chunks->append(ms);
267 assert(ns+1 == _next_chunk, "");
268 _next_chunk = ns;
269 return ms->_offset;
270 }
271
272 // No match. Add this guy to the list, in hopes of future shares.
273 _all_chunks->append(ns);
274 return serialized_null;
275 }
276
277
278 // must call add_safepoint before: it sets PcDesc and this routine uses
279 // the last PcDesc set
280 void DebugInformationRecorder::describe_scope(int pc_offset,
281 ciMethod* method,
282 int bci,
283 bool reexecute,
284 DebugToken* locals,
285 DebugToken* expressions,
286 DebugToken* monitors) {
287 assert(_recording_state != rs_null, "nesting of recording calls");
288 PcDesc* last_pd = last_pc();
289 assert(last_pd->pc_offset() == pc_offset, "must be last pc");
290 int sender_stream_offset = last_pd->scope_decode_offset();
291 // update the stream offset of current pc desc
292 int stream_offset = stream()->position();
293 last_pd->set_scope_decode_offset(stream_offset);
294
295 // Record reexecute bit into pcDesc
296 last_pd->set_should_reexecute(reexecute);
297
298 // serialize sender stream offest
299 stream()->write_int(sender_stream_offset);
300
301 // serialize scope
302 jobject method_enc = (method == NULL)? NULL: method->constant_encoding();
303 stream()->write_int(oop_recorder()->find_index(method_enc));
304 stream()->write_bci(bci);
305 assert(method == NULL ||
306 (method->is_native() && bci == 0) ||
307 (!method->is_native() && 0 <= bci && bci < method->code_size()) ||
308 bci == -1, "illegal bci");
309
310 // serialize the locals/expressions/monitors
311 stream()->write_int((intptr_t) locals);
312 stream()->write_int((intptr_t) expressions);
313 stream()->write_int((intptr_t) monitors);
314
315 // Here's a tricky bit. We just wrote some bytes.
316 // Wouldn't it be nice to find that we had already
|
264 // Searching in _all_chunks is limited to a window,
265 // but searching in _shared_chunks is unlimited.
266 _shared_chunks->append(ms);
267 assert(ns+1 == _next_chunk, "");
268 _next_chunk = ns;
269 return ms->_offset;
270 }
271
272 // No match. Add this guy to the list, in hopes of future shares.
273 _all_chunks->append(ns);
274 return serialized_null;
275 }
276
277
278 // must call add_safepoint before: it sets PcDesc and this routine uses
279 // the last PcDesc set
280 void DebugInformationRecorder::describe_scope(int pc_offset,
281 ciMethod* method,
282 int bci,
283 bool reexecute,
284 bool is_method_handle_invoke,
285 DebugToken* locals,
286 DebugToken* expressions,
287 DebugToken* monitors) {
288 assert(_recording_state != rs_null, "nesting of recording calls");
289 PcDesc* last_pd = last_pc();
290 assert(last_pd->pc_offset() == pc_offset, "must be last pc");
291 int sender_stream_offset = last_pd->scope_decode_offset();
292 // update the stream offset of current pc desc
293 int stream_offset = stream()->position();
294 last_pd->set_scope_decode_offset(stream_offset);
295
296 // Record flags into pcDesc.
297 last_pd->set_should_reexecute(reexecute);
298 last_pd->set_is_method_handle_invoke(is_method_handle_invoke);
299
300 // serialize sender stream offest
301 stream()->write_int(sender_stream_offset);
302
303 // serialize scope
304 jobject method_enc = (method == NULL)? NULL: method->constant_encoding();
305 stream()->write_int(oop_recorder()->find_index(method_enc));
306 stream()->write_bci(bci);
307 assert(method == NULL ||
308 (method->is_native() && bci == 0) ||
309 (!method->is_native() && 0 <= bci && bci < method->code_size()) ||
310 bci == -1, "illegal bci");
311
312 // serialize the locals/expressions/monitors
313 stream()->write_int((intptr_t) locals);
314 stream()->write_int((intptr_t) expressions);
315 stream()->write_int((intptr_t) monitors);
316
317 // Here's a tricky bit. We just wrote some bytes.
318 // Wouldn't it be nice to find that we had already
|