< prev index next >

src/hotspot/share/code/debugInfoRec.cpp

Print this page

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

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

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

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