1146 DebugToken* monitors_token = nullptr;
1147
1148 if (full_info) {
1149 u1 frame_flags = stream->read_u1("flags");
1150 rethrow_exception = is_set(frame_flags, DIF_RETHROW_EXCEPTION);
1151
1152 if (bci >= 0) {
1153 reexecute = !is_set(frame_flags, DIF_DURING_CALL);
1154 }
1155
1156 GrowableArray<ScopeValue*>* locals = read_local_or_stack_values(stream, frame_flags, true, JVMCI_CHECK);
1157 GrowableArray<ScopeValue*>* stack = read_local_or_stack_values(stream, frame_flags, false, JVMCI_CHECK);
1158 GrowableArray<MonitorValue*>* monitors = read_monitor_values(stream, frame_flags, JVMCI_CHECK);
1159
1160 locals_token = _debug_recorder->create_scope_values(locals);
1161 stack_token = _debug_recorder->create_scope_values(stack);
1162 monitors_token = _debug_recorder->create_monitor_values(monitors);
1163 }
1164
1165 // has_ea_local_in_scope and arg_escape should be added to JVMCI
1166 const bool has_ea_local_in_scope = false;
1167 const bool arg_escape = false;
1168 _debug_recorder->describe_scope(pc_offset, method, nullptr, bci, reexecute, rethrow_exception, is_mh_invoke, return_oop,
1169 has_ea_local_in_scope, arg_escape,
1170 locals_token, stack_token, monitors_token);
1171 }
1172 }
1173 if (full_info) {
1174 // Clear the virtual objects as they are specific to one DebugInfo
1175 stream->set_virtual_objects(nullptr);
1176 }
1177 }
1178
1179 void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, u1 tag, JVMCI_TRAPS) {
1180 u1 flags = stream->read_u1("debugInfo:flags");
1181 OopMap *map = create_oop_map(stream, flags, JVMCI_CHECK);
1182 _debug_recorder->add_safepoint(pc_offset, map);
1183 record_scope(pc_offset, stream, flags, true, JVMCI_CHECK);
1184 _debug_recorder->end_safepoint(pc_offset);
1185 if (_orig_pc_offset < 0) {
1186 JVMCI_ERROR("method contains safepoint, but has no deopt rescue slot");
1187 }
1188 if (tag == SITE_IMPLICIT_EXCEPTION_DISPATCH) {
1189 jint dispatch_offset = stream->read_s4("dispatchOffset");
1293 default: {
1294 JVMCI_ERROR("unknown data patch tag: %d%s", tag, stream->context());
1295 }
1296 }
1297 }
1298
1299 void CodeInstaller::site_Mark(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, JVMCI_TRAPS) {
1300 u1 id = stream->read_u1("mark:id");
1301 address pc = _instructions->start() + pc_offset;
1302
1303 if (pd_relocate(pc, id)) {
1304 return;
1305 }
1306
1307 switch (id) {
1308 case UNVERIFIED_ENTRY:
1309 _offsets.set_value(CodeOffsets::Entry, pc_offset);
1310 break;
1311 case VERIFIED_ENTRY:
1312 _offsets.set_value(CodeOffsets::Verified_Entry, pc_offset);
1313 break;
1314 case OSR_ENTRY:
1315 _offsets.set_value(CodeOffsets::OSR_Entry, pc_offset);
1316 break;
1317 case EXCEPTION_HANDLER_ENTRY:
1318 _offsets.set_value(CodeOffsets::Exceptions, pc_offset);
1319 break;
1320 case DEOPT_HANDLER_ENTRY:
1321 _offsets.set_value(CodeOffsets::Deopt, pc_offset);
1322 break;
1323 case DEOPT_MH_HANDLER_ENTRY:
1324 _offsets.set_value(CodeOffsets::DeoptMH, pc_offset);
1325 break;
1326 case FRAME_COMPLETE:
1327 _offsets.set_value(CodeOffsets::Frame_Complete, pc_offset);
1328 break;
1329 case ENTRY_BARRIER_PATCH:
1330 _nmethod_entry_patch_offset = pc_offset;
1331 break;
1332 case INVOKEVIRTUAL:
|
1146 DebugToken* monitors_token = nullptr;
1147
1148 if (full_info) {
1149 u1 frame_flags = stream->read_u1("flags");
1150 rethrow_exception = is_set(frame_flags, DIF_RETHROW_EXCEPTION);
1151
1152 if (bci >= 0) {
1153 reexecute = !is_set(frame_flags, DIF_DURING_CALL);
1154 }
1155
1156 GrowableArray<ScopeValue*>* locals = read_local_or_stack_values(stream, frame_flags, true, JVMCI_CHECK);
1157 GrowableArray<ScopeValue*>* stack = read_local_or_stack_values(stream, frame_flags, false, JVMCI_CHECK);
1158 GrowableArray<MonitorValue*>* monitors = read_monitor_values(stream, frame_flags, JVMCI_CHECK);
1159
1160 locals_token = _debug_recorder->create_scope_values(locals);
1161 stack_token = _debug_recorder->create_scope_values(stack);
1162 monitors_token = _debug_recorder->create_monitor_values(monitors);
1163 }
1164
1165 // has_ea_local_in_scope and arg_escape should be added to JVMCI
1166 const bool return_scalarized = false;
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 return_scalarized, 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 _offsets.set_value(CodeOffsets::Verified_Inline_Entry, pc_offset);
1315 _offsets.set_value(CodeOffsets::Verified_Inline_Entry_RO, pc_offset);
1316 break;
1317 case OSR_ENTRY:
1318 _offsets.set_value(CodeOffsets::OSR_Entry, pc_offset);
1319 break;
1320 case EXCEPTION_HANDLER_ENTRY:
1321 _offsets.set_value(CodeOffsets::Exceptions, pc_offset);
1322 break;
1323 case DEOPT_HANDLER_ENTRY:
1324 _offsets.set_value(CodeOffsets::Deopt, pc_offset);
1325 break;
1326 case DEOPT_MH_HANDLER_ENTRY:
1327 _offsets.set_value(CodeOffsets::DeoptMH, pc_offset);
1328 break;
1329 case FRAME_COMPLETE:
1330 _offsets.set_value(CodeOffsets::Frame_Complete, pc_offset);
1331 break;
1332 case ENTRY_BARRIER_PATCH:
1333 _nmethod_entry_patch_offset = pc_offset;
1334 break;
1335 case INVOKEVIRTUAL:
|