1108 DebugToken* monitors_token = nullptr;
1109
1110 if (full_info) {
1111 u1 frame_flags = stream->read_u1("flags");
1112 rethrow_exception = is_set(frame_flags, DIF_RETHROW_EXCEPTION);
1113
1114 if (bci >= 0) {
1115 reexecute = !is_set(frame_flags, DIF_DURING_CALL);
1116 }
1117
1118 GrowableArray<ScopeValue*>* locals = read_local_or_stack_values(stream, frame_flags, true, JVMCI_CHECK);
1119 GrowableArray<ScopeValue*>* stack = read_local_or_stack_values(stream, frame_flags, false, JVMCI_CHECK);
1120 GrowableArray<MonitorValue*>* monitors = read_monitor_values(stream, frame_flags, JVMCI_CHECK);
1121
1122 locals_token = _debug_recorder->create_scope_values(locals);
1123 stack_token = _debug_recorder->create_scope_values(stack);
1124 monitors_token = _debug_recorder->create_monitor_values(monitors);
1125 }
1126
1127 // has_ea_local_in_scope and arg_escape should be added to JVMCI
1128 const bool has_ea_local_in_scope = false;
1129 const bool arg_escape = false;
1130 _debug_recorder->describe_scope(pc_offset, method, nullptr, bci, reexecute, rethrow_exception, is_mh_invoke, return_oop,
1131 has_ea_local_in_scope, arg_escape,
1132 locals_token, stack_token, monitors_token);
1133 }
1134 }
1135 if (full_info) {
1136 // Clear the virtual objects as they are specific to one DebugInfo
1137 stream->set_virtual_objects(nullptr);
1138 }
1139 }
1140
1141 void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, u1 tag, JVMCI_TRAPS) {
1142 u1 flags = stream->read_u1("debugInfo:flags");
1143 OopMap *map = create_oop_map(stream, flags, JVMCI_CHECK);
1144 _debug_recorder->add_safepoint(pc_offset, map);
1145 record_scope(pc_offset, stream, flags, true, JVMCI_CHECK);
1146 _debug_recorder->end_safepoint(pc_offset);
1147 if (_orig_pc_offset < 0) {
1148 JVMCI_ERROR("method contains safepoint, but has no deopt rescue slot");
1149 }
1150 if (tag == SITE_IMPLICIT_EXCEPTION_DISPATCH) {
1151 jint dispatch_offset = stream->read_s4("dispatchOffset");
1250 JVMCI_ERROR("data offset 0x%x points outside data section (size 0x%x)%s", data_offset, _constants_size, stream->context());
1251 }
1252 break;
1253 }
1254 default: {
1255 JVMCI_ERROR("unknown data patch tag: %d%s", tag, stream->context());
1256 }
1257 }
1258 }
1259
1260 void CodeInstaller::site_Mark(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, JVMCI_TRAPS) {
1261 u1 id = stream->read_u1("mark:id");
1262 address pc = _instructions->start() + pc_offset;
1263
1264 switch (id) {
1265 case UNVERIFIED_ENTRY:
1266 _offsets.set_value(CodeOffsets::Entry, pc_offset);
1267 break;
1268 case VERIFIED_ENTRY:
1269 _offsets.set_value(CodeOffsets::Verified_Entry, pc_offset);
1270 break;
1271 case OSR_ENTRY:
1272 _offsets.set_value(CodeOffsets::OSR_Entry, pc_offset);
1273 break;
1274 case EXCEPTION_HANDLER_ENTRY:
1275 _offsets.set_value(CodeOffsets::Exceptions, pc_offset);
1276 break;
1277 case DEOPT_HANDLER_ENTRY:
1278 _offsets.set_value(CodeOffsets::Deopt, pc_offset);
1279 break;
1280 case DEOPT_MH_HANDLER_ENTRY:
1281 _offsets.set_value(CodeOffsets::DeoptMH, pc_offset);
1282 break;
1283 case FRAME_COMPLETE:
1284 _offsets.set_value(CodeOffsets::Frame_Complete, pc_offset);
1285 break;
1286 case ENTRY_BARRIER_PATCH:
1287 _nmethod_entry_patch_offset = pc_offset;
1288 break;
1289 case INVOKEVIRTUAL:
|
1108 DebugToken* monitors_token = nullptr;
1109
1110 if (full_info) {
1111 u1 frame_flags = stream->read_u1("flags");
1112 rethrow_exception = is_set(frame_flags, DIF_RETHROW_EXCEPTION);
1113
1114 if (bci >= 0) {
1115 reexecute = !is_set(frame_flags, DIF_DURING_CALL);
1116 }
1117
1118 GrowableArray<ScopeValue*>* locals = read_local_or_stack_values(stream, frame_flags, true, JVMCI_CHECK);
1119 GrowableArray<ScopeValue*>* stack = read_local_or_stack_values(stream, frame_flags, false, JVMCI_CHECK);
1120 GrowableArray<MonitorValue*>* monitors = read_monitor_values(stream, frame_flags, JVMCI_CHECK);
1121
1122 locals_token = _debug_recorder->create_scope_values(locals);
1123 stack_token = _debug_recorder->create_scope_values(stack);
1124 monitors_token = _debug_recorder->create_monitor_values(monitors);
1125 }
1126
1127 // has_ea_local_in_scope and arg_escape should be added to JVMCI
1128 const bool return_scalarized = false;
1129 const bool has_ea_local_in_scope = false;
1130 const bool arg_escape = false;
1131 _debug_recorder->describe_scope(pc_offset, method, nullptr, bci, reexecute, rethrow_exception, is_mh_invoke, return_oop,
1132 return_scalarized, has_ea_local_in_scope, arg_escape,
1133 locals_token, stack_token, monitors_token);
1134 }
1135 }
1136 if (full_info) {
1137 // Clear the virtual objects as they are specific to one DebugInfo
1138 stream->set_virtual_objects(nullptr);
1139 }
1140 }
1141
1142 void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, u1 tag, JVMCI_TRAPS) {
1143 u1 flags = stream->read_u1("debugInfo:flags");
1144 OopMap *map = create_oop_map(stream, flags, JVMCI_CHECK);
1145 _debug_recorder->add_safepoint(pc_offset, map);
1146 record_scope(pc_offset, stream, flags, true, JVMCI_CHECK);
1147 _debug_recorder->end_safepoint(pc_offset);
1148 if (_orig_pc_offset < 0) {
1149 JVMCI_ERROR("method contains safepoint, but has no deopt rescue slot");
1150 }
1151 if (tag == SITE_IMPLICIT_EXCEPTION_DISPATCH) {
1152 jint dispatch_offset = stream->read_s4("dispatchOffset");
1251 JVMCI_ERROR("data offset 0x%x points outside data section (size 0x%x)%s", data_offset, _constants_size, stream->context());
1252 }
1253 break;
1254 }
1255 default: {
1256 JVMCI_ERROR("unknown data patch tag: %d%s", tag, stream->context());
1257 }
1258 }
1259 }
1260
1261 void CodeInstaller::site_Mark(CodeBuffer& buffer, jint pc_offset, HotSpotCompiledCodeStream* stream, JVMCI_TRAPS) {
1262 u1 id = stream->read_u1("mark:id");
1263 address pc = _instructions->start() + pc_offset;
1264
1265 switch (id) {
1266 case UNVERIFIED_ENTRY:
1267 _offsets.set_value(CodeOffsets::Entry, pc_offset);
1268 break;
1269 case VERIFIED_ENTRY:
1270 _offsets.set_value(CodeOffsets::Verified_Entry, pc_offset);
1271 _offsets.set_value(CodeOffsets::Verified_Inline_Entry, pc_offset);
1272 _offsets.set_value(CodeOffsets::Verified_Inline_Entry_RO, pc_offset);
1273 break;
1274 case OSR_ENTRY:
1275 _offsets.set_value(CodeOffsets::OSR_Entry, pc_offset);
1276 break;
1277 case EXCEPTION_HANDLER_ENTRY:
1278 _offsets.set_value(CodeOffsets::Exceptions, pc_offset);
1279 break;
1280 case DEOPT_HANDLER_ENTRY:
1281 _offsets.set_value(CodeOffsets::Deopt, pc_offset);
1282 break;
1283 case DEOPT_MH_HANDLER_ENTRY:
1284 _offsets.set_value(CodeOffsets::DeoptMH, pc_offset);
1285 break;
1286 case FRAME_COMPLETE:
1287 _offsets.set_value(CodeOffsets::Frame_Complete, pc_offset);
1288 break;
1289 case ENTRY_BARRIER_PATCH:
1290 _nmethod_entry_patch_offset = pc_offset;
1291 break;
1292 case INVOKEVIRTUAL:
|