< prev index next >

src/hotspot/share/jvmci/jvmciCodeInstaller.cpp

Print this page

1165       DebugToken* monitors_token = nullptr;
1166 
1167       if (full_info) {
1168         u1 frame_flags = stream->read_u1("flags");
1169         rethrow_exception = is_set(frame_flags, DIF_RETHROW_EXCEPTION);
1170 
1171         if (bci >= 0) {
1172           reexecute = !is_set(frame_flags, DIF_DURING_CALL);
1173         }
1174 
1175         GrowableArray<ScopeValue*>* locals = read_local_or_stack_values(stream, frame_flags, true, JVMCI_CHECK);
1176         GrowableArray<ScopeValue*>* stack = read_local_or_stack_values(stream, frame_flags, false, JVMCI_CHECK);
1177         GrowableArray<MonitorValue*>* monitors = read_monitor_values(stream, frame_flags, JVMCI_CHECK);
1178 
1179         locals_token = _debug_recorder->create_scope_values(locals);
1180         stack_token = _debug_recorder->create_scope_values(stack);
1181         monitors_token = _debug_recorder->create_monitor_values(monitors);
1182       }
1183 
1184       // has_ea_local_in_scope and arg_escape should be added to JVMCI

1185       const bool has_ea_local_in_scope = false;
1186       const bool arg_escape            = false;
1187       _debug_recorder->describe_scope(pc_offset, method, nullptr, bci, reexecute, rethrow_exception, is_mh_invoke, return_oop,
1188                                       has_ea_local_in_scope, arg_escape,
1189                                       locals_token, stack_token, monitors_token);
1190     }
1191   }
1192   if (full_info) {
1193     // Clear the virtual objects as they are specific to one DebugInfo
1194     stream->set_virtual_objects(nullptr);
1195   }
1196 }
1197 
1198 void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, u1 tag, JVMCI_TRAPS) {
1199   u1 flags = stream->read_u1("debugInfo:flags");
1200   OopMap *map = create_oop_map(stream, flags, JVMCI_CHECK);
1201   _debug_recorder->add_safepoint(pc_offset, map);
1202   record_scope(pc_offset, stream, flags, true, JVMCI_CHECK);
1203   _debug_recorder->end_safepoint(pc_offset);
1204   if (_orig_pc_offset < 0) {
1205     JVMCI_ERROR("method contains safepoint, but has no deopt rescue slot");
1206   }
1207   if (tag == SITE_IMPLICIT_EXCEPTION_DISPATCH) {
1208     jint dispatch_offset = stream->read_s4("dispatchOffset");

1312     default: {
1313       JVMCI_ERROR("unknown data patch tag: %d%s", tag, stream->context());
1314     }
1315   }
1316 }
1317 
1318 void CodeInstaller::site_Mark(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, JVMCI_TRAPS) {
1319   u1 id = stream->read_u1("mark:id");
1320   address pc = _instructions->start() + pc_offset;
1321 
1322   if (pd_relocate(pc, id)) {
1323     return;
1324   }
1325 
1326   switch (id) {
1327     case UNVERIFIED_ENTRY:
1328       _offsets.set_value(CodeOffsets::Entry, pc_offset);
1329       break;
1330     case VERIFIED_ENTRY:
1331       _offsets.set_value(CodeOffsets::Verified_Entry, pc_offset);


1332       break;
1333     case OSR_ENTRY:
1334       _offsets.set_value(CodeOffsets::OSR_Entry, pc_offset);
1335       break;
1336     case EXCEPTION_HANDLER_ENTRY:
1337       _offsets.set_value(CodeOffsets::Exceptions, pc_offset);
1338       break;
1339     case DEOPT_HANDLER_ENTRY:
1340       _offsets.set_value(CodeOffsets::Deopt, pc_offset);
1341       break;
1342     case DEOPT_MH_HANDLER_ENTRY:
1343       _offsets.set_value(CodeOffsets::DeoptMH, pc_offset);
1344       break;
1345     case FRAME_COMPLETE:
1346       _offsets.set_value(CodeOffsets::Frame_Complete, pc_offset);
1347       break;
1348     case ENTRY_BARRIER_PATCH:
1349       _nmethod_entry_patch_offset = pc_offset;
1350       break;
1351     case INVOKEVIRTUAL:

1165       DebugToken* monitors_token = nullptr;
1166 
1167       if (full_info) {
1168         u1 frame_flags = stream->read_u1("flags");
1169         rethrow_exception = is_set(frame_flags, DIF_RETHROW_EXCEPTION);
1170 
1171         if (bci >= 0) {
1172           reexecute = !is_set(frame_flags, DIF_DURING_CALL);
1173         }
1174 
1175         GrowableArray<ScopeValue*>* locals = read_local_or_stack_values(stream, frame_flags, true, JVMCI_CHECK);
1176         GrowableArray<ScopeValue*>* stack = read_local_or_stack_values(stream, frame_flags, false, JVMCI_CHECK);
1177         GrowableArray<MonitorValue*>* monitors = read_monitor_values(stream, frame_flags, JVMCI_CHECK);
1178 
1179         locals_token = _debug_recorder->create_scope_values(locals);
1180         stack_token = _debug_recorder->create_scope_values(stack);
1181         monitors_token = _debug_recorder->create_monitor_values(monitors);
1182       }
1183 
1184       // has_ea_local_in_scope and arg_escape should be added to JVMCI
1185       const bool return_scalarized     = false;
1186       const bool has_ea_local_in_scope = false;
1187       const bool arg_escape            = false;
1188       _debug_recorder->describe_scope(pc_offset, method, nullptr, bci, reexecute, rethrow_exception, is_mh_invoke, return_oop,
1189                                       return_scalarized, has_ea_local_in_scope, arg_escape,
1190                                       locals_token, stack_token, monitors_token);
1191     }
1192   }
1193   if (full_info) {
1194     // Clear the virtual objects as they are specific to one DebugInfo
1195     stream->set_virtual_objects(nullptr);
1196   }
1197 }
1198 
1199 void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, u1 tag, JVMCI_TRAPS) {
1200   u1 flags = stream->read_u1("debugInfo:flags");
1201   OopMap *map = create_oop_map(stream, flags, JVMCI_CHECK);
1202   _debug_recorder->add_safepoint(pc_offset, map);
1203   record_scope(pc_offset, stream, flags, true, JVMCI_CHECK);
1204   _debug_recorder->end_safepoint(pc_offset);
1205   if (_orig_pc_offset < 0) {
1206     JVMCI_ERROR("method contains safepoint, but has no deopt rescue slot");
1207   }
1208   if (tag == SITE_IMPLICIT_EXCEPTION_DISPATCH) {
1209     jint dispatch_offset = stream->read_s4("dispatchOffset");

1313     default: {
1314       JVMCI_ERROR("unknown data patch tag: %d%s", tag, stream->context());
1315     }
1316   }
1317 }
1318 
1319 void CodeInstaller::site_Mark(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, JVMCI_TRAPS) {
1320   u1 id = stream->read_u1("mark:id");
1321   address pc = _instructions->start() + pc_offset;
1322 
1323   if (pd_relocate(pc, id)) {
1324     return;
1325   }
1326 
1327   switch (id) {
1328     case UNVERIFIED_ENTRY:
1329       _offsets.set_value(CodeOffsets::Entry, pc_offset);
1330       break;
1331     case VERIFIED_ENTRY:
1332       _offsets.set_value(CodeOffsets::Verified_Entry, pc_offset);
1333       _offsets.set_value(CodeOffsets::Verified_Inline_Entry, pc_offset);
1334       _offsets.set_value(CodeOffsets::Verified_Inline_Entry_RO, pc_offset);
1335       break;
1336     case OSR_ENTRY:
1337       _offsets.set_value(CodeOffsets::OSR_Entry, pc_offset);
1338       break;
1339     case EXCEPTION_HANDLER_ENTRY:
1340       _offsets.set_value(CodeOffsets::Exceptions, pc_offset);
1341       break;
1342     case DEOPT_HANDLER_ENTRY:
1343       _offsets.set_value(CodeOffsets::Deopt, pc_offset);
1344       break;
1345     case DEOPT_MH_HANDLER_ENTRY:
1346       _offsets.set_value(CodeOffsets::DeoptMH, pc_offset);
1347       break;
1348     case FRAME_COMPLETE:
1349       _offsets.set_value(CodeOffsets::Frame_Complete, pc_offset);
1350       break;
1351     case ENTRY_BARRIER_PATCH:
1352       _nmethod_entry_patch_offset = pc_offset;
1353       break;
1354     case INVOKEVIRTUAL:
< prev index next >