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, 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");
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 FRAME_COMPLETE:
1337 _offsets.set_value(CodeOffsets::Frame_Complete, pc_offset);
1338 break;
1339 case ENTRY_BARRIER_PATCH:
1340 _nmethod_entry_patch_offset = pc_offset;
1341 break;
1342 case INVOKEVIRTUAL:
1343 case INVOKEINTERFACE:
1344 case INLINE_INVOKE:
1345 case INVOKESTATIC:
|
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, 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");
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 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:
1346 case INVOKEINTERFACE:
1347 case INLINE_INVOKE:
1348 case INVOKESTATIC:
|