< prev index next >

src/hotspot/share/code/debugInfoRec.cpp

Print this page

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        is_optimized_linkToNative,
292                                               bool        return_oop,

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_is_optimized_linkToNative(is_optimized_linkToNative);
311   last_pd->set_return_oop(return_oop);

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 offest
316   stream()->write_int(sender_stream_offset);
317 
318   // serialize scope
319   Metadata* method_enc;
320   if (method != NULL) {
321     method_enc = method->constant_encoding();
322   } else if (methodH.not_null()) {
323     method_enc = methodH();
324   } else {
325     method_enc = NULL;
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 == NULL ||
331          (method->is_native() && bci == 0) ||

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        is_optimized_linkToNative,
292                                               bool        return_oop,
293                                               bool        return_scalarized,
294                                               bool        has_ea_local_in_scope,
295                                               bool        arg_escape,
296                                               DebugToken* locals,
297                                               DebugToken* expressions,
298                                               DebugToken* monitors) {
299   assert(_recording_state != rs_null, "nesting of recording calls");
300   PcDesc* last_pd = last_pc();
301   assert(last_pd->pc_offset() == pc_offset, "must be last pc");
302   int sender_stream_offset = last_pd->scope_decode_offset();
303   // update the stream offset of current pc desc
304   int stream_offset = stream()->position();
305   last_pd->set_scope_decode_offset(stream_offset);
306 
307   // Record flags into pcDesc.
308   last_pd->set_should_reexecute(reexecute);
309   last_pd->set_rethrow_exception(rethrow_exception);
310   last_pd->set_is_method_handle_invoke(is_method_handle_invoke);
311   last_pd->set_is_optimized_linkToNative(is_optimized_linkToNative);
312   last_pd->set_return_oop(return_oop);
313   last_pd->set_return_scalarized(return_scalarized);
314   last_pd->set_has_ea_local_in_scope(has_ea_local_in_scope);
315   last_pd->set_arg_escape(arg_escape);
316 
317   // serialize sender stream offest
318   stream()->write_int(sender_stream_offset);
319 
320   // serialize scope
321   Metadata* method_enc;
322   if (method != NULL) {
323     method_enc = method->constant_encoding();
324   } else if (methodH.not_null()) {
325     method_enc = methodH();
326   } else {
327     method_enc = NULL;
328   }
329   int method_enc_index = oop_recorder()->find_index(method_enc);
330   stream()->write_int(method_enc_index);
331   stream()->write_bci(bci);
332   assert(method == NULL ||
333          (method->is_native() && bci == 0) ||
< prev index next >