< prev index next >

src/hotspot/share/jvmci/jvmciCodeInstaller.cpp

Print this page

1047       }
1048       if (second != NULL) {
1049         i++;
1050         if (i >= JVMCIENV->get_length(values) || !JVMCIENV->equals(JVMCIENV->get_object_at(values, i), jvmci_env()->get_Value_ILLEGAL())) {
1051           JVMCI_ERROR("double-slot value not followed by Value.ILLEGAL");
1052         }
1053       }
1054     }
1055 
1056     locals_token = _debug_recorder->create_scope_values(locals);
1057     expressions_token = _debug_recorder->create_scope_values(expressions);
1058     monitors_token = _debug_recorder->create_monitor_values(monitors);
1059 
1060     throw_exception = jvmci_env()->get_BytecodeFrame_rethrowException(frame) == JNI_TRUE;
1061   }
1062 
1063   // has_ea_local_in_scope and arg_escape should be added to JVMCI
1064   const bool is_opt_native         = false;
1065   const bool has_ea_local_in_scope = false;
1066   const bool arg_escape            = false;
1067   _debug_recorder->describe_scope(pc_offset, method, NULL, bci, reexecute, throw_exception, is_mh_invoke, is_opt_native, return_oop,
1068                                   has_ea_local_in_scope, arg_escape,
1069                                   locals_token, expressions_token, monitors_token);
1070 }
1071 
1072 void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, JVMCIObject site, JVMCI_TRAPS) {
1073   JVMCIObject debug_info = jvmci_env()->get_site_Infopoint_debugInfo(site);
1074   if (debug_info.is_null()) {
1075     JVMCI_ERROR("debug info expected at safepoint at %i", pc_offset);
1076   }
1077 
1078   // address instruction = _instructions->start() + pc_offset;
1079   // jint next_pc_offset = Assembler::locate_next_instruction(instruction) - _instructions->start();
1080   OopMap *map = create_oop_map(debug_info, JVMCI_CHECK);
1081   _debug_recorder->add_safepoint(pc_offset, map);
1082   record_scope(pc_offset, debug_info, CodeInstaller::FullFrame, JVMCI_CHECK);
1083   _debug_recorder->end_safepoint(pc_offset);
1084 }
1085 
1086 void CodeInstaller::site_Infopoint(CodeBuffer& buffer, jint pc_offset, JVMCIObject site, JVMCI_TRAPS) {
1087   JVMCIObject debug_info = jvmci_env()->get_site_Infopoint_debugInfo(site);

1192   }
1193 }
1194 
1195 void CodeInstaller::site_Mark(CodeBuffer& buffer, jint pc_offset, JVMCIObject site, JVMCI_TRAPS) {
1196   JVMCIObject id_obj = jvmci_env()->get_site_Mark_id(site);
1197 
1198   if (id_obj.is_non_null()) {
1199     if (!jvmci_env()->is_boxing_object(T_INT, id_obj)) {
1200       JVMCI_ERROR("expected Integer id, got %s", jvmci_env()->klass_name(id_obj));
1201     }
1202     jint id = jvmci_env()->get_boxed_value(T_INT, id_obj).i;
1203 
1204     address pc = _instructions->start() + pc_offset;
1205 
1206     switch (id) {
1207       case UNVERIFIED_ENTRY:
1208         _offsets.set_value(CodeOffsets::Entry, pc_offset);
1209         break;
1210       case VERIFIED_ENTRY:
1211         _offsets.set_value(CodeOffsets::Verified_Entry, pc_offset);


1212         break;
1213       case OSR_ENTRY:
1214         _offsets.set_value(CodeOffsets::OSR_Entry, pc_offset);
1215         break;
1216       case EXCEPTION_HANDLER_ENTRY:
1217         _offsets.set_value(CodeOffsets::Exceptions, pc_offset);
1218         break;
1219       case DEOPT_HANDLER_ENTRY:
1220         _offsets.set_value(CodeOffsets::Deopt, pc_offset);
1221         break;
1222       case DEOPT_MH_HANDLER_ENTRY:
1223         _offsets.set_value(CodeOffsets::DeoptMH, pc_offset);
1224         break;
1225       case FRAME_COMPLETE:
1226         _offsets.set_value(CodeOffsets::Frame_Complete, pc_offset);
1227         break;
1228       case INVOKEVIRTUAL:
1229       case INVOKEINTERFACE:
1230       case INLINE_INVOKE:
1231       case INVOKESTATIC:

1047       }
1048       if (second != NULL) {
1049         i++;
1050         if (i >= JVMCIENV->get_length(values) || !JVMCIENV->equals(JVMCIENV->get_object_at(values, i), jvmci_env()->get_Value_ILLEGAL())) {
1051           JVMCI_ERROR("double-slot value not followed by Value.ILLEGAL");
1052         }
1053       }
1054     }
1055 
1056     locals_token = _debug_recorder->create_scope_values(locals);
1057     expressions_token = _debug_recorder->create_scope_values(expressions);
1058     monitors_token = _debug_recorder->create_monitor_values(monitors);
1059 
1060     throw_exception = jvmci_env()->get_BytecodeFrame_rethrowException(frame) == JNI_TRUE;
1061   }
1062 
1063   // has_ea_local_in_scope and arg_escape should be added to JVMCI
1064   const bool is_opt_native         = false;
1065   const bool has_ea_local_in_scope = false;
1066   const bool arg_escape            = false;
1067   _debug_recorder->describe_scope(pc_offset, method, NULL, bci, reexecute, throw_exception, is_mh_invoke, is_opt_native, return_oop, false,
1068                                   has_ea_local_in_scope, arg_escape,
1069                                   locals_token, expressions_token, monitors_token);
1070 }
1071 
1072 void CodeInstaller::site_Safepoint(CodeBuffer& buffer, jint pc_offset, JVMCIObject site, JVMCI_TRAPS) {
1073   JVMCIObject debug_info = jvmci_env()->get_site_Infopoint_debugInfo(site);
1074   if (debug_info.is_null()) {
1075     JVMCI_ERROR("debug info expected at safepoint at %i", pc_offset);
1076   }
1077 
1078   // address instruction = _instructions->start() + pc_offset;
1079   // jint next_pc_offset = Assembler::locate_next_instruction(instruction) - _instructions->start();
1080   OopMap *map = create_oop_map(debug_info, JVMCI_CHECK);
1081   _debug_recorder->add_safepoint(pc_offset, map);
1082   record_scope(pc_offset, debug_info, CodeInstaller::FullFrame, JVMCI_CHECK);
1083   _debug_recorder->end_safepoint(pc_offset);
1084 }
1085 
1086 void CodeInstaller::site_Infopoint(CodeBuffer& buffer, jint pc_offset, JVMCIObject site, JVMCI_TRAPS) {
1087   JVMCIObject debug_info = jvmci_env()->get_site_Infopoint_debugInfo(site);

1192   }
1193 }
1194 
1195 void CodeInstaller::site_Mark(CodeBuffer& buffer, jint pc_offset, JVMCIObject site, JVMCI_TRAPS) {
1196   JVMCIObject id_obj = jvmci_env()->get_site_Mark_id(site);
1197 
1198   if (id_obj.is_non_null()) {
1199     if (!jvmci_env()->is_boxing_object(T_INT, id_obj)) {
1200       JVMCI_ERROR("expected Integer id, got %s", jvmci_env()->klass_name(id_obj));
1201     }
1202     jint id = jvmci_env()->get_boxed_value(T_INT, id_obj).i;
1203 
1204     address pc = _instructions->start() + pc_offset;
1205 
1206     switch (id) {
1207       case UNVERIFIED_ENTRY:
1208         _offsets.set_value(CodeOffsets::Entry, pc_offset);
1209         break;
1210       case VERIFIED_ENTRY:
1211         _offsets.set_value(CodeOffsets::Verified_Entry, pc_offset);
1212         _offsets.set_value(CodeOffsets::Verified_Inline_Entry, pc_offset);
1213         _offsets.set_value(CodeOffsets::Verified_Inline_Entry_RO, pc_offset);
1214         break;
1215       case OSR_ENTRY:
1216         _offsets.set_value(CodeOffsets::OSR_Entry, pc_offset);
1217         break;
1218       case EXCEPTION_HANDLER_ENTRY:
1219         _offsets.set_value(CodeOffsets::Exceptions, pc_offset);
1220         break;
1221       case DEOPT_HANDLER_ENTRY:
1222         _offsets.set_value(CodeOffsets::Deopt, pc_offset);
1223         break;
1224       case DEOPT_MH_HANDLER_ENTRY:
1225         _offsets.set_value(CodeOffsets::DeoptMH, pc_offset);
1226         break;
1227       case FRAME_COMPLETE:
1228         _offsets.set_value(CodeOffsets::Frame_Complete, pc_offset);
1229         break;
1230       case INVOKEVIRTUAL:
1231       case INVOKEINTERFACE:
1232       case INLINE_INVOKE:
1233       case INVOKESTATIC:
< prev index next >