1159 DebugToken* monitors_token = nullptr;
1160
1161 if (full_info) {
1162 u1 frame_flags = stream->read_u1("flags");
1163 rethrow_exception = is_set(frame_flags, DIF_RETHROW_EXCEPTION);
1164
1165 if (bci >= 0) {
1166 reexecute = !is_set(frame_flags, DIF_DURING_CALL);
1167 }
1168
1169 GrowableArray<ScopeValue*>* locals = read_local_or_stack_values(stream, frame_flags, true, JVMCI_CHECK);
1170 GrowableArray<ScopeValue*>* stack = read_local_or_stack_values(stream, frame_flags, false, JVMCI_CHECK);
1171 GrowableArray<MonitorValue*>* monitors = read_monitor_values(stream, frame_flags, JVMCI_CHECK);
1172
1173 locals_token = _debug_recorder->create_scope_values(locals);
1174 stack_token = _debug_recorder->create_scope_values(stack);
1175 monitors_token = _debug_recorder->create_monitor_values(monitors);
1176 }
1177
1178 // has_ea_local_in_scope and arg_escape should be added to JVMCI
1179 const bool has_ea_local_in_scope = false;
1180 const bool arg_escape = false;
1181 _debug_recorder->describe_scope(pc_offset, method, nullptr, bci, reexecute, rethrow_exception, is_mh_invoke, return_oop,
1182 has_ea_local_in_scope, arg_escape,
1183 locals_token, stack_token, monitors_token);
1184 }
1185 }
1186 if (full_info) {
1187 // Clear the virtual objects as they are specific to one DebugInfo
1188 stream->set_virtual_objects(nullptr);
1189 }
1190 }
1191
1192 void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, u1 tag, JVMCI_TRAPS) {
1193 u1 flags = stream->read_u1("debugInfo:flags");
1194 OopMap *map = create_oop_map(stream, flags, JVMCI_CHECK);
1195 _debug_recorder->add_safepoint(pc_offset, map);
1196 record_scope(pc_offset, stream, flags, true, JVMCI_CHECK);
1197 _debug_recorder->end_safepoint(pc_offset);
1198 if (_orig_pc_offset < 0) {
1199 JVMCI_ERROR("method contains safepoint, but has no deopt rescue slot");
1200 }
1201 if (tag == SITE_IMPLICIT_EXCEPTION_DISPATCH) {
1202 jint dispatch_offset = stream->read_s4("dispatchOffset");
1306 default: {
1307 JVMCI_ERROR("unknown data patch tag: %d%s", tag, stream->context());
1308 }
1309 }
1310 }
1311
1312 void CodeInstaller::site_Mark(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, JVMCI_TRAPS) {
1313 u1 id = stream->read_u1("mark:id");
1314 address pc = _instructions->start() + pc_offset;
1315
1316 if (pd_relocate(pc, id)) {
1317 return;
1318 }
1319
1320 switch (id) {
1321 case UNVERIFIED_ENTRY:
1322 _offsets.set_value(CodeOffsets::Entry, pc_offset);
1323 break;
1324 case VERIFIED_ENTRY:
1325 _offsets.set_value(CodeOffsets::Verified_Entry, pc_offset);
1326 break;
1327 case OSR_ENTRY:
1328 _offsets.set_value(CodeOffsets::OSR_Entry, pc_offset);
1329 break;
1330 case EXCEPTION_HANDLER_ENTRY:
1331 _offsets.set_value(CodeOffsets::Exceptions, pc_offset);
1332 break;
1333 case DEOPT_HANDLER_ENTRY:
1334 _offsets.set_value(CodeOffsets::Deopt, pc_offset);
1335 break;
1336 case DEOPT_MH_HANDLER_ENTRY:
1337 _offsets.set_value(CodeOffsets::DeoptMH, pc_offset);
1338 break;
1339 case FRAME_COMPLETE:
1340 _offsets.set_value(CodeOffsets::Frame_Complete, pc_offset);
1341 break;
1342 case ENTRY_BARRIER_PATCH:
1343 _nmethod_entry_patch_offset = pc_offset;
1344 break;
1345 case INVOKEVIRTUAL:
|
1159 DebugToken* monitors_token = nullptr;
1160
1161 if (full_info) {
1162 u1 frame_flags = stream->read_u1("flags");
1163 rethrow_exception = is_set(frame_flags, DIF_RETHROW_EXCEPTION);
1164
1165 if (bci >= 0) {
1166 reexecute = !is_set(frame_flags, DIF_DURING_CALL);
1167 }
1168
1169 GrowableArray<ScopeValue*>* locals = read_local_or_stack_values(stream, frame_flags, true, JVMCI_CHECK);
1170 GrowableArray<ScopeValue*>* stack = read_local_or_stack_values(stream, frame_flags, false, JVMCI_CHECK);
1171 GrowableArray<MonitorValue*>* monitors = read_monitor_values(stream, frame_flags, JVMCI_CHECK);
1172
1173 locals_token = _debug_recorder->create_scope_values(locals);
1174 stack_token = _debug_recorder->create_scope_values(stack);
1175 monitors_token = _debug_recorder->create_monitor_values(monitors);
1176 }
1177
1178 // has_ea_local_in_scope and arg_escape should be added to JVMCI
1179 const bool return_scalarized = false;
1180 const bool has_ea_local_in_scope = false;
1181 const bool arg_escape = false;
1182 _debug_recorder->describe_scope(pc_offset, method, nullptr, bci, reexecute, rethrow_exception, is_mh_invoke, return_oop,
1183 return_scalarized, has_ea_local_in_scope, arg_escape,
1184 locals_token, stack_token, monitors_token);
1185 }
1186 }
1187 if (full_info) {
1188 // Clear the virtual objects as they are specific to one DebugInfo
1189 stream->set_virtual_objects(nullptr);
1190 }
1191 }
1192
1193 void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, u1 tag, JVMCI_TRAPS) {
1194 u1 flags = stream->read_u1("debugInfo:flags");
1195 OopMap *map = create_oop_map(stream, flags, JVMCI_CHECK);
1196 _debug_recorder->add_safepoint(pc_offset, map);
1197 record_scope(pc_offset, stream, flags, true, JVMCI_CHECK);
1198 _debug_recorder->end_safepoint(pc_offset);
1199 if (_orig_pc_offset < 0) {
1200 JVMCI_ERROR("method contains safepoint, but has no deopt rescue slot");
1201 }
1202 if (tag == SITE_IMPLICIT_EXCEPTION_DISPATCH) {
1203 jint dispatch_offset = stream->read_s4("dispatchOffset");
1307 default: {
1308 JVMCI_ERROR("unknown data patch tag: %d%s", tag, stream->context());
1309 }
1310 }
1311 }
1312
1313 void CodeInstaller::site_Mark(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, JVMCI_TRAPS) {
1314 u1 id = stream->read_u1("mark:id");
1315 address pc = _instructions->start() + pc_offset;
1316
1317 if (pd_relocate(pc, id)) {
1318 return;
1319 }
1320
1321 switch (id) {
1322 case UNVERIFIED_ENTRY:
1323 _offsets.set_value(CodeOffsets::Entry, pc_offset);
1324 break;
1325 case VERIFIED_ENTRY:
1326 _offsets.set_value(CodeOffsets::Verified_Entry, pc_offset);
1327 _offsets.set_value(CodeOffsets::Verified_Inline_Entry, pc_offset);
1328 _offsets.set_value(CodeOffsets::Verified_Inline_Entry_RO, pc_offset);
1329 break;
1330 case OSR_ENTRY:
1331 _offsets.set_value(CodeOffsets::OSR_Entry, pc_offset);
1332 break;
1333 case EXCEPTION_HANDLER_ENTRY:
1334 _offsets.set_value(CodeOffsets::Exceptions, pc_offset);
1335 break;
1336 case DEOPT_HANDLER_ENTRY:
1337 _offsets.set_value(CodeOffsets::Deopt, pc_offset);
1338 break;
1339 case DEOPT_MH_HANDLER_ENTRY:
1340 _offsets.set_value(CodeOffsets::DeoptMH, pc_offset);
1341 break;
1342 case FRAME_COMPLETE:
1343 _offsets.set_value(CodeOffsets::Frame_Complete, pc_offset);
1344 break;
1345 case ENTRY_BARRIER_PATCH:
1346 _nmethod_entry_patch_offset = pc_offset;
1347 break;
1348 case INVOKEVIRTUAL:
|