< prev index next >

src/hotspot/share/code/debugInfoRec.cpp

Print this page

272     assert(ns+1 == _next_chunk, "");
273     _next_chunk = ns;
274     return match->offset();
275   } else {
276     // Inserted this chunk, so nothing to do
277     return serialized_null;
278   }
279 }
280 
281 
282 // must call add_safepoint before: it sets PcDesc and this routine uses
283 // the last PcDesc set
284 void DebugInformationRecorder::describe_scope(int         pc_offset,
285                                               const methodHandle& methodH,
286                                               ciMethod*   method,
287                                               int         bci,
288                                               bool        reexecute,
289                                               bool        rethrow_exception,
290                                               bool        is_method_handle_invoke,
291                                               bool        return_oop,

292                                               bool        has_ea_local_in_scope,
293                                               bool        arg_escape,
294                                               DebugToken* locals,
295                                               DebugToken* expressions,
296                                               DebugToken* monitors) {
297   assert(_recording_state != rs_null, "nesting of recording calls");
298   PcDesc* last_pd = last_pc();
299   assert(last_pd->pc_offset() == pc_offset, "must be last pc");
300   int sender_stream_offset = last_pd->scope_decode_offset();
301   // update the stream offset of current pc desc
302   int stream_offset = stream()->position();
303   last_pd->set_scope_decode_offset(stream_offset);
304 
305   // Record flags into pcDesc.
306   last_pd->set_should_reexecute(reexecute);
307   last_pd->set_rethrow_exception(rethrow_exception);
308   last_pd->set_is_method_handle_invoke(is_method_handle_invoke);
309   last_pd->set_return_oop(return_oop);

310   last_pd->set_has_ea_local_in_scope(has_ea_local_in_scope);
311   last_pd->set_arg_escape(arg_escape);
312 
313   // serialize sender stream offset
314   stream()->write_int(sender_stream_offset);
315 
316   // serialize scope
317   Metadata* method_enc;
318   if (method != nullptr) {
319     method_enc = method->constant_encoding();
320   } else if (methodH.not_null()) {
321     method_enc = methodH();
322   } else {
323     method_enc = nullptr;
324   }
325   int method_enc_index = oop_recorder()->find_index(method_enc);
326   stream()->write_int(method_enc_index);
327   stream()->write_bci(bci);
328   assert(method == nullptr ||
329          (method->is_native() && bci == 0) ||

272     assert(ns+1 == _next_chunk, "");
273     _next_chunk = ns;
274     return match->offset();
275   } else {
276     // Inserted this chunk, so nothing to do
277     return serialized_null;
278   }
279 }
280 
281 
282 // must call add_safepoint before: it sets PcDesc and this routine uses
283 // the last PcDesc set
284 void DebugInformationRecorder::describe_scope(int         pc_offset,
285                                               const methodHandle& methodH,
286                                               ciMethod*   method,
287                                               int         bci,
288                                               bool        reexecute,
289                                               bool        rethrow_exception,
290                                               bool        is_method_handle_invoke,
291                                               bool        return_oop,
292                                               bool        return_scalarized,
293                                               bool        has_ea_local_in_scope,
294                                               bool        arg_escape,
295                                               DebugToken* locals,
296                                               DebugToken* expressions,
297                                               DebugToken* monitors) {
298   assert(_recording_state != rs_null, "nesting of recording calls");
299   PcDesc* last_pd = last_pc();
300   assert(last_pd->pc_offset() == pc_offset, "must be last pc");
301   int sender_stream_offset = last_pd->scope_decode_offset();
302   // update the stream offset of current pc desc
303   int stream_offset = stream()->position();
304   last_pd->set_scope_decode_offset(stream_offset);
305 
306   // Record flags into pcDesc.
307   last_pd->set_should_reexecute(reexecute);
308   last_pd->set_rethrow_exception(rethrow_exception);
309   last_pd->set_is_method_handle_invoke(is_method_handle_invoke);
310   last_pd->set_return_oop(return_oop);
311   last_pd->set_return_scalarized(return_scalarized);
312   last_pd->set_has_ea_local_in_scope(has_ea_local_in_scope);
313   last_pd->set_arg_escape(arg_escape);
314 
315   // serialize sender stream offset
316   stream()->write_int(sender_stream_offset);
317 
318   // serialize scope
319   Metadata* method_enc;
320   if (method != nullptr) {
321     method_enc = method->constant_encoding();
322   } else if (methodH.not_null()) {
323     method_enc = methodH();
324   } else {
325     method_enc = nullptr;
326   }
327   int method_enc_index = oop_recorder()->find_index(method_enc);
328   stream()->write_int(method_enc_index);
329   stream()->write_bci(bci);
330   assert(method == nullptr ||
331          (method->is_native() && bci == 0) ||
< prev index next >