< prev index next >

src/hotspot/share/jvmci/jvmciCodeInstaller.cpp

Print this page

1147       DebugToken* monitors_token = nullptr;
1148 
1149       if (full_info) {
1150         u1 frame_flags = stream->read_u1("flags");
1151         rethrow_exception = is_set(frame_flags, DIF_RETHROW_EXCEPTION);
1152 
1153         if (bci >= 0) {
1154           reexecute = !is_set(frame_flags, DIF_DURING_CALL);
1155         }
1156 
1157         GrowableArray<ScopeValue*>* locals = read_local_or_stack_values(stream, frame_flags, true, JVMCI_CHECK);
1158         GrowableArray<ScopeValue*>* stack = read_local_or_stack_values(stream, frame_flags, false, JVMCI_CHECK);
1159         GrowableArray<MonitorValue*>* monitors = read_monitor_values(stream, frame_flags, JVMCI_CHECK);
1160 
1161         locals_token = _debug_recorder->create_scope_values(locals);
1162         stack_token = _debug_recorder->create_scope_values(stack);
1163         monitors_token = _debug_recorder->create_monitor_values(monitors);
1164       }
1165 
1166       // has_ea_local_in_scope and arg_escape should be added to JVMCI

1167       const bool has_ea_local_in_scope = false;
1168       const bool arg_escape            = false;
1169       _debug_recorder->describe_scope(pc_offset, method, nullptr, bci, reexecute, rethrow_exception, is_mh_invoke, return_oop,
1170                                       has_ea_local_in_scope, arg_escape,
1171                                       locals_token, stack_token, monitors_token);
1172     }
1173   }
1174   if (full_info) {
1175     // Clear the virtual objects as they are specific to one DebugInfo
1176     stream->set_virtual_objects(nullptr);
1177   }
1178 }
1179 
1180 void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, u1 tag, JVMCI_TRAPS) {
1181   u1 flags = stream->read_u1("debugInfo:flags");
1182   OopMap *map = create_oop_map(stream, flags, JVMCI_CHECK);
1183   _debug_recorder->add_safepoint(pc_offset, map);
1184   record_scope(pc_offset, stream, flags, true, JVMCI_CHECK);
1185   _debug_recorder->end_safepoint(pc_offset);
1186   if (_orig_pc_offset < 0) {
1187     JVMCI_ERROR("method contains safepoint, but has no deopt rescue slot");
1188   }
1189   if (tag == SITE_IMPLICIT_EXCEPTION_DISPATCH) {
1190     jint dispatch_offset = stream->read_s4("dispatchOffset");

1294     default: {
1295       JVMCI_ERROR("unknown data patch tag: %d%s", tag, stream->context());
1296     }
1297   }
1298 }
1299 
1300 void CodeInstaller::site_Mark(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, JVMCI_TRAPS) {
1301   u1 id = stream->read_u1("mark:id");
1302   address pc = _instructions->start() + pc_offset;
1303 
1304   if (pd_relocate(pc, id)) {
1305     return;
1306   }
1307 
1308   switch (id) {
1309     case UNVERIFIED_ENTRY:
1310       _offsets.set_value(CodeOffsets::Entry, pc_offset);
1311       break;
1312     case VERIFIED_ENTRY:
1313       _offsets.set_value(CodeOffsets::Verified_Entry, pc_offset);


1314       break;
1315     case OSR_ENTRY:
1316       _offsets.set_value(CodeOffsets::OSR_Entry, pc_offset);
1317       break;
1318     case EXCEPTION_HANDLER_ENTRY:
1319       _offsets.set_value(CodeOffsets::Exceptions, pc_offset);
1320       break;
1321     case DEOPT_HANDLER_ENTRY:
1322       _offsets.set_value(CodeOffsets::Deopt, pc_offset);
1323       break;
1324     case DEOPT_MH_HANDLER_ENTRY:
1325       _offsets.set_value(CodeOffsets::DeoptMH, pc_offset);
1326       break;
1327     case FRAME_COMPLETE:
1328       _offsets.set_value(CodeOffsets::Frame_Complete, pc_offset);
1329       break;
1330     case ENTRY_BARRIER_PATCH:
1331       _nmethod_entry_patch_offset = pc_offset;
1332       break;
1333     case INVOKEVIRTUAL:

1147       DebugToken* monitors_token = nullptr;
1148 
1149       if (full_info) {
1150         u1 frame_flags = stream->read_u1("flags");
1151         rethrow_exception = is_set(frame_flags, DIF_RETHROW_EXCEPTION);
1152 
1153         if (bci >= 0) {
1154           reexecute = !is_set(frame_flags, DIF_DURING_CALL);
1155         }
1156 
1157         GrowableArray<ScopeValue*>* locals = read_local_or_stack_values(stream, frame_flags, true, JVMCI_CHECK);
1158         GrowableArray<ScopeValue*>* stack = read_local_or_stack_values(stream, frame_flags, false, JVMCI_CHECK);
1159         GrowableArray<MonitorValue*>* monitors = read_monitor_values(stream, frame_flags, JVMCI_CHECK);
1160 
1161         locals_token = _debug_recorder->create_scope_values(locals);
1162         stack_token = _debug_recorder->create_scope_values(stack);
1163         monitors_token = _debug_recorder->create_monitor_values(monitors);
1164       }
1165 
1166       // has_ea_local_in_scope and arg_escape should be added to JVMCI
1167       const bool return_scalarized     = false;
1168       const bool has_ea_local_in_scope = false;
1169       const bool arg_escape            = false;
1170       _debug_recorder->describe_scope(pc_offset, method, nullptr, bci, reexecute, rethrow_exception, is_mh_invoke, return_oop,
1171                                       return_scalarized, has_ea_local_in_scope, arg_escape,
1172                                       locals_token, stack_token, monitors_token);
1173     }
1174   }
1175   if (full_info) {
1176     // Clear the virtual objects as they are specific to one DebugInfo
1177     stream->set_virtual_objects(nullptr);
1178   }
1179 }
1180 
1181 void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, u1 tag, JVMCI_TRAPS) {
1182   u1 flags = stream->read_u1("debugInfo:flags");
1183   OopMap *map = create_oop_map(stream, flags, JVMCI_CHECK);
1184   _debug_recorder->add_safepoint(pc_offset, map);
1185   record_scope(pc_offset, stream, flags, true, JVMCI_CHECK);
1186   _debug_recorder->end_safepoint(pc_offset);
1187   if (_orig_pc_offset < 0) {
1188     JVMCI_ERROR("method contains safepoint, but has no deopt rescue slot");
1189   }
1190   if (tag == SITE_IMPLICIT_EXCEPTION_DISPATCH) {
1191     jint dispatch_offset = stream->read_s4("dispatchOffset");

1295     default: {
1296       JVMCI_ERROR("unknown data patch tag: %d%s", tag, stream->context());
1297     }
1298   }
1299 }
1300 
1301 void CodeInstaller::site_Mark(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, JVMCI_TRAPS) {
1302   u1 id = stream->read_u1("mark:id");
1303   address pc = _instructions->start() + pc_offset;
1304 
1305   if (pd_relocate(pc, id)) {
1306     return;
1307   }
1308 
1309   switch (id) {
1310     case UNVERIFIED_ENTRY:
1311       _offsets.set_value(CodeOffsets::Entry, pc_offset);
1312       break;
1313     case VERIFIED_ENTRY:
1314       _offsets.set_value(CodeOffsets::Verified_Entry, pc_offset);
1315       _offsets.set_value(CodeOffsets::Verified_Inline_Entry, pc_offset);
1316       _offsets.set_value(CodeOffsets::Verified_Inline_Entry_RO, pc_offset);
1317       break;
1318     case OSR_ENTRY:
1319       _offsets.set_value(CodeOffsets::OSR_Entry, pc_offset);
1320       break;
1321     case EXCEPTION_HANDLER_ENTRY:
1322       _offsets.set_value(CodeOffsets::Exceptions, pc_offset);
1323       break;
1324     case DEOPT_HANDLER_ENTRY:
1325       _offsets.set_value(CodeOffsets::Deopt, pc_offset);
1326       break;
1327     case DEOPT_MH_HANDLER_ENTRY:
1328       _offsets.set_value(CodeOffsets::DeoptMH, pc_offset);
1329       break;
1330     case FRAME_COMPLETE:
1331       _offsets.set_value(CodeOffsets::Frame_Complete, pc_offset);
1332       break;
1333     case ENTRY_BARRIER_PATCH:
1334       _nmethod_entry_patch_offset = pc_offset;
1335       break;
1336     case INVOKEVIRTUAL:
< prev index next >