< prev index next >

src/hotspot/share/ci/ciReplay.cpp

Print this page

  25 #include "precompiled.hpp"
  26 #include "ci/ciMethodData.hpp"
  27 #include "ci/ciReplay.hpp"
  28 #include "ci/ciSymbol.hpp"
  29 #include "ci/ciKlass.hpp"
  30 #include "ci/ciUtilities.inline.hpp"
  31 #include "classfile/javaClasses.hpp"
  32 #include "classfile/symbolTable.hpp"
  33 #include "classfile/systemDictionary.hpp"
  34 #include "compiler/compilationPolicy.hpp"
  35 #include "compiler/compileBroker.hpp"
  36 #include "compiler/compilerDefinitions.inline.hpp"
  37 #include "interpreter/linkResolver.hpp"
  38 #include "jvm.h"
  39 #include "memory/allocation.inline.hpp"
  40 #include "memory/oopFactory.hpp"
  41 #include "memory/resourceArea.hpp"
  42 #include "oops/constantPool.hpp"
  43 #include "oops/cpCache.inline.hpp"
  44 #include "oops/fieldStreams.inline.hpp"

  45 #include "oops/klass.inline.hpp"
  46 #include "oops/method.inline.hpp"
  47 #include "oops/oop.inline.hpp"
  48 #include "prims/jvmtiExport.hpp"
  49 #include "prims/methodHandles.hpp"
  50 #include "runtime/fieldDescriptor.inline.hpp"
  51 #include "runtime/globals_extension.hpp"
  52 #include "runtime/handles.inline.hpp"
  53 #include "runtime/java.hpp"
  54 #include "runtime/jniHandles.inline.hpp"
  55 #include "runtime/threads.hpp"
  56 #include "utilities/copy.hpp"
  57 #include "utilities/macros.hpp"
  58 #include "utilities/utf8.hpp"
  59 
  60 // ciReplay
  61 
  62 typedef struct _ciMethodDataRecord {
  63   const char* _klass_name;
  64   const char* _method_name;

 969     ConstantPool* cp = k->constants();
 970     if (length != cp->length()) {
 971       report_error("constant pool length mismatch: wrong class files?");
 972       return;
 973     }
 974 
 975     int parsed_two_word = 0;
 976     for (int i = 1; i < length; i++) {
 977       int tag = parse_int("tag");
 978       if (had_error()) {
 979         return;
 980       }
 981       switch (cp->tag_at(i).value()) {
 982         case JVM_CONSTANT_UnresolvedClass: {
 983           if (tag == JVM_CONSTANT_Class) {
 984             tty->print_cr("Resolving klass %s at %d", cp->klass_name_at(i)->as_utf8(), i);
 985             Klass* k = cp->klass_at(i, CHECK);
 986           }
 987           break;
 988         }

 989         case JVM_CONSTANT_Long:
 990         case JVM_CONSTANT_Double:
 991           parsed_two_word = i + 1;
 992 
 993         case JVM_CONSTANT_ClassIndex:
 994         case JVM_CONSTANT_StringIndex:
 995         case JVM_CONSTANT_String:
 996         case JVM_CONSTANT_UnresolvedClassInError:
 997         case JVM_CONSTANT_Fieldref:
 998         case JVM_CONSTANT_Methodref:
 999         case JVM_CONSTANT_InterfaceMethodref:
1000         case JVM_CONSTANT_NameAndType:
1001         case JVM_CONSTANT_Utf8:
1002         case JVM_CONSTANT_Integer:
1003         case JVM_CONSTANT_Float:
1004         case JVM_CONSTANT_MethodHandle:
1005         case JVM_CONSTANT_MethodType:
1006         case JVM_CONSTANT_Dynamic:
1007         case JVM_CONSTANT_InvokeDynamic:
1008           if (tag != cp->tag_at(i).value()) {

1015           if (tag == JVM_CONSTANT_UnresolvedClass) {
1016             Klass* k = cp->klass_at(i, CHECK);
1017             tty->print_cr("Warning: entry was unresolved in the replay data: %s", k->name()->as_utf8());
1018           } else if (tag != JVM_CONSTANT_Class) {
1019             report_error("Unexpected tag");
1020             return;
1021           }
1022           break;
1023 
1024         case 0:
1025           if (parsed_two_word == i) continue;
1026 
1027         default:
1028           fatal("Unexpected tag: %d", cp->tag_at(i).value());
1029           break;
1030       }
1031 
1032     }
1033   }
1034 
1035   // staticfield <klass> <name> <signature> <value>
1036   //
1037   // Initialize a class and fill in the value for a static field.
1038   // This is useful when the compile was dependent on the value of
1039   // static fields but it's impossible to properly rerun the static
1040   // initializer.
1041   void process_staticfield(TRAPS) {
1042     InstanceKlass* k = (InstanceKlass *)parse_klass(CHECK);
1043 
1044     if (k == nullptr || ReplaySuppressInitializers == 0 ||
1045         (ReplaySuppressInitializers == 2 && k->class_loader() == nullptr)) {
1046       skip_remaining();
1047       return;
1048     }
1049 
1050     assert(k->is_initialized(), "must be");
1051 
1052     const char* field_name = parse_escaped_string();
1053     const char* field_signature = parse_string();
1054     fieldDescriptor fd;
1055     Symbol* name = SymbolTable::new_symbol(field_name);
1056     Symbol* sig = SymbolTable::new_symbol(field_signature);
1057     if (!k->find_local_field(name, sig, &fd) ||
1058         !fd.is_static() ||
1059         fd.has_initial_value()) {
1060       report_error(field_name);
1061       return;




















































1062     }

1063 
1064     oop java_mirror = k->java_mirror();
1065     if (field_signature[0] == JVM_SIGNATURE_ARRAY) {
1066       int length = parse_int("array length");
1067       oop value = nullptr;
1068 
1069       if (field_signature[1] == JVM_SIGNATURE_ARRAY) {
1070         // multi dimensional array
1071         ArrayKlass* kelem = (ArrayKlass *)parse_klass(CHECK);
1072         if (kelem == nullptr) {
1073           return;
1074         }
1075         int rank = 0;
1076         while (field_signature[rank] == JVM_SIGNATURE_ARRAY) {
1077           rank++;
1078         }
1079         jint* dims = NEW_RESOURCE_ARRAY(jint, rank);
1080         dims[0] = length;
1081         for (int i = 1; i < rank; i++) {
1082           dims[i] = 1; // These aren't relevant to the compiler
1083         }
1084         value = kelem->multi_allocate(rank, dims, CHECK);
1085       } else {
1086         if (strcmp(field_signature, "[B") == 0) {
1087           value = oopFactory::new_byteArray(length, CHECK);
1088         } else if (strcmp(field_signature, "[Z") == 0) {
1089           value = oopFactory::new_boolArray(length, CHECK);
1090         } else if (strcmp(field_signature, "[C") == 0) {
1091           value = oopFactory::new_charArray(length, CHECK);
1092         } else if (strcmp(field_signature, "[S") == 0) {
1093           value = oopFactory::new_shortArray(length, CHECK);
1094         } else if (strcmp(field_signature, "[F") == 0) {
1095           value = oopFactory::new_floatArray(length, CHECK);
1096         } else if (strcmp(field_signature, "[D") == 0) {
1097           value = oopFactory::new_doubleArray(length, CHECK);
1098         } else if (strcmp(field_signature, "[I") == 0) {
1099           value = oopFactory::new_intArray(length, CHECK);
1100         } else if (strcmp(field_signature, "[J") == 0) {
1101           value = oopFactory::new_longArray(length, CHECK);
1102         } else if (field_signature[0] == JVM_SIGNATURE_ARRAY &&
1103                    field_signature[1] == JVM_SIGNATURE_CLASS) {
1104           parse_klass(CHECK); // eat up the array class name
1105           Klass* kelem = resolve_klass(field_signature + 1, CHECK);
1106           value = oopFactory::new_objArray(kelem, length, CHECK);





1107         } else {
1108           report_error("unhandled array staticfield");
1109         }
1110       }























































































1111       java_mirror->obj_field_put(fd.offset(), value);
1112     } else {
1113       const char* string_value = parse_escaped_string();
1114       if (strcmp(field_signature, "I") == 0) {
1115         int value = atoi(string_value);
1116         java_mirror->int_field_put(fd.offset(), value);
1117       } else if (strcmp(field_signature, "B") == 0) {
1118         int value = atoi(string_value);
1119         java_mirror->byte_field_put(fd.offset(), value);
1120       } else if (strcmp(field_signature, "C") == 0) {
1121         int value = atoi(string_value);
1122         java_mirror->char_field_put(fd.offset(), value);
1123       } else if (strcmp(field_signature, "S") == 0) {
1124         int value = atoi(string_value);
1125         java_mirror->short_field_put(fd.offset(), value);
1126       } else if (strcmp(field_signature, "Z") == 0) {
1127         int value = atoi(string_value);
1128         java_mirror->bool_field_put(fd.offset(), value);
1129       } else if (strcmp(field_signature, "J") == 0) {
1130         jlong value;
1131         if (sscanf(string_value, JLONG_FORMAT, &value) != 1) {
1132           fprintf(stderr, "Error parsing long: %s\n", string_value);
1133           return;
1134         }
1135         java_mirror->long_field_put(fd.offset(), value);
1136       } else if (strcmp(field_signature, "F") == 0) {
1137         float value = atof(string_value);
1138         java_mirror->float_field_put(fd.offset(), value);
1139       } else if (strcmp(field_signature, "D") == 0) {
1140         double value = atof(string_value);
1141         java_mirror->double_field_put(fd.offset(), value);
1142       } else if (strcmp(field_signature, "Ljava/lang/String;") == 0) {
1143         Handle value = java_lang_String::create_from_str(string_value, CHECK);
1144         java_mirror->obj_field_put(fd.offset(), value());
1145       } else if (field_signature[0] == JVM_SIGNATURE_CLASS) {
1146         Klass* k = resolve_klass(string_value, CHECK);
1147         oop value = InstanceKlass::cast(k)->allocate_instance(CHECK);
1148         java_mirror->obj_field_put(fd.offset(), value);
1149       } else {
1150         report_error("unhandled staticfield");
1151       }
1152     }
1153   }
1154 
1155 #if INCLUDE_JVMTI
1156   // JvmtiExport <field> <value>
1157   void process_JvmtiExport(TRAPS) {
1158     const char* field = parse_string();
1159     bool value = parse_int("JvmtiExport flag") != 0;
1160     if (strcmp(field, "can_access_local_variables") == 0) {
1161       JvmtiExport::set_can_access_local_variables(value);
1162     } else if (strcmp(field, "can_hotswap_or_post_breakpoint") == 0) {
1163       JvmtiExport::set_can_hotswap_or_post_breakpoint(value);
1164     } else if (strcmp(field, "can_post_on_exceptions") == 0) {
1165       JvmtiExport::set_can_post_on_exceptions(value);
1166     } else {
1167       report_error("Unrecognized JvmtiExport directive");
1168     }
1169   }

  25 #include "precompiled.hpp"
  26 #include "ci/ciMethodData.hpp"
  27 #include "ci/ciReplay.hpp"
  28 #include "ci/ciSymbol.hpp"
  29 #include "ci/ciKlass.hpp"
  30 #include "ci/ciUtilities.inline.hpp"
  31 #include "classfile/javaClasses.hpp"
  32 #include "classfile/symbolTable.hpp"
  33 #include "classfile/systemDictionary.hpp"
  34 #include "compiler/compilationPolicy.hpp"
  35 #include "compiler/compileBroker.hpp"
  36 #include "compiler/compilerDefinitions.inline.hpp"
  37 #include "interpreter/linkResolver.hpp"
  38 #include "jvm.h"
  39 #include "memory/allocation.inline.hpp"
  40 #include "memory/oopFactory.hpp"
  41 #include "memory/resourceArea.hpp"
  42 #include "oops/constantPool.hpp"
  43 #include "oops/cpCache.inline.hpp"
  44 #include "oops/fieldStreams.inline.hpp"
  45 #include "oops/inlineKlass.inline.hpp"
  46 #include "oops/klass.inline.hpp"
  47 #include "oops/method.inline.hpp"
  48 #include "oops/oop.inline.hpp"
  49 #include "prims/jvmtiExport.hpp"
  50 #include "prims/methodHandles.hpp"
  51 #include "runtime/fieldDescriptor.inline.hpp"
  52 #include "runtime/globals_extension.hpp"
  53 #include "runtime/handles.inline.hpp"
  54 #include "runtime/java.hpp"
  55 #include "runtime/jniHandles.inline.hpp"
  56 #include "runtime/threads.hpp"
  57 #include "utilities/copy.hpp"
  58 #include "utilities/macros.hpp"
  59 #include "utilities/utf8.hpp"
  60 
  61 // ciReplay
  62 
  63 typedef struct _ciMethodDataRecord {
  64   const char* _klass_name;
  65   const char* _method_name;

 970     ConstantPool* cp = k->constants();
 971     if (length != cp->length()) {
 972       report_error("constant pool length mismatch: wrong class files?");
 973       return;
 974     }
 975 
 976     int parsed_two_word = 0;
 977     for (int i = 1; i < length; i++) {
 978       int tag = parse_int("tag");
 979       if (had_error()) {
 980         return;
 981       }
 982       switch (cp->tag_at(i).value()) {
 983         case JVM_CONSTANT_UnresolvedClass: {
 984           if (tag == JVM_CONSTANT_Class) {
 985             tty->print_cr("Resolving klass %s at %d", cp->klass_name_at(i)->as_utf8(), i);
 986             Klass* k = cp->klass_at(i, CHECK);
 987           }
 988           break;
 989         }
 990 
 991         case JVM_CONSTANT_Long:
 992         case JVM_CONSTANT_Double:
 993           parsed_two_word = i + 1;
 994 
 995         case JVM_CONSTANT_ClassIndex:
 996         case JVM_CONSTANT_StringIndex:
 997         case JVM_CONSTANT_String:
 998         case JVM_CONSTANT_UnresolvedClassInError:
 999         case JVM_CONSTANT_Fieldref:
1000         case JVM_CONSTANT_Methodref:
1001         case JVM_CONSTANT_InterfaceMethodref:
1002         case JVM_CONSTANT_NameAndType:
1003         case JVM_CONSTANT_Utf8:
1004         case JVM_CONSTANT_Integer:
1005         case JVM_CONSTANT_Float:
1006         case JVM_CONSTANT_MethodHandle:
1007         case JVM_CONSTANT_MethodType:
1008         case JVM_CONSTANT_Dynamic:
1009         case JVM_CONSTANT_InvokeDynamic:
1010           if (tag != cp->tag_at(i).value()) {

1017           if (tag == JVM_CONSTANT_UnresolvedClass) {
1018             Klass* k = cp->klass_at(i, CHECK);
1019             tty->print_cr("Warning: entry was unresolved in the replay data: %s", k->name()->as_utf8());
1020           } else if (tag != JVM_CONSTANT_Class) {
1021             report_error("Unexpected tag");
1022             return;
1023           }
1024           break;
1025 
1026         case 0:
1027           if (parsed_two_word == i) continue;
1028 
1029         default:
1030           fatal("Unexpected tag: %d", cp->tag_at(i).value());
1031           break;
1032       }
1033 
1034     }
1035   }
1036 
1037   class InlineTypeFieldInitializer : public FieldClosure {
1038     oop _vt;
1039     CompileReplay* _replay;
1040   public:
1041     InlineTypeFieldInitializer(oop vt, CompileReplay* replay)
1042   : _vt(vt), _replay(replay) {}
1043 
1044     void do_field(fieldDescriptor* fd) {
1045       BasicType bt = fd->field_type();
1046       const char* string_value = bt != T_PRIMITIVE_OBJECT ? _replay->parse_escaped_string() : nullptr;
1047       switch (bt) {
1048       case T_BYTE: {
1049         int value = atoi(string_value);
1050         _vt->byte_field_put(fd->offset(), value);
1051         break;
1052       }
1053       case T_BOOLEAN: {
1054         int value = atoi(string_value);
1055         _vt->bool_field_put(fd->offset(), value);
1056         break;
1057       }
1058       case T_SHORT: {
1059         int value = atoi(string_value);
1060         _vt->short_field_put(fd->offset(), value);
1061         break;
1062       }
1063       case T_CHAR: {
1064         int value = atoi(string_value);
1065         _vt->char_field_put(fd->offset(), value);
1066         break;
1067       }
1068       case T_INT: {
1069         int value = atoi(string_value);
1070         _vt->int_field_put(fd->offset(), value);
1071         break;
1072       }
1073       case T_LONG: {
1074         jlong value;
1075         if (sscanf(string_value, JLONG_FORMAT, &value) != 1) {
1076           fprintf(stderr, "Error parsing long: %s\n", string_value);
1077           break;
1078         }
1079         _vt->long_field_put(fd->offset(), value);
1080         break;
1081       }
1082       case T_FLOAT: {
1083         float value = atof(string_value);
1084         _vt->float_field_put(fd->offset(), value);
1085         break;
1086       }
1087       case T_DOUBLE: {
1088         double value = atof(string_value);
1089         _vt->double_field_put(fd->offset(), value);
1090         break;
1091       }
1092       case T_ARRAY:
1093       case T_OBJECT: {
1094         JavaThread* THREAD = JavaThread::current();
1095         bool res = _replay->process_staticfield_reference(string_value, _vt, fd, THREAD);
1096         assert(res, "should succeed for arrays & objects");
1097         break;
1098       }
1099       case T_PRIMITIVE_OBJECT: {
1100         InlineKlass* vk = InlineKlass::cast(fd->field_holder()->get_inline_type_field_klass(fd->index()));
1101         if (fd->is_inlined()) {
1102           int field_offset = fd->offset() - vk->first_field_offset();
1103           oop obj = cast_to_oop(cast_from_oop<address>(_vt) + field_offset);
1104           InlineTypeFieldInitializer init_fields(obj, _replay);
1105           vk->do_nonstatic_fields(&init_fields);
1106         } else {
1107           oop value = vk->allocate_instance(JavaThread::current());
1108           _vt->obj_field_put(fd->offset(), value);
1109         }
1110         break;
1111       }
1112       default: {
1113         fatal("Unhandled type: %s", type2name(bt));
1114       }
1115       }
1116     }
1117   };
1118 
1119   bool process_staticfield_reference(const char* field_signature, oop java_mirror, fieldDescriptor* fd, TRAPS) {
1120     if (field_signature[0] == JVM_SIGNATURE_ARRAY) {
1121       int length = parse_int("array length");
1122       oop value = nullptr;
1123 
1124       if (field_signature[1] == JVM_SIGNATURE_ARRAY) {
1125         // multi dimensional array
1126         Klass* k = resolve_klass(field_signature, CHECK_(true));
1127         ArrayKlass* kelem = (ArrayKlass *)k;


1128         int rank = 0;
1129         while (field_signature[rank] == JVM_SIGNATURE_ARRAY) {
1130           rank++;
1131         }
1132         jint* dims = NEW_RESOURCE_ARRAY(jint, rank);
1133         dims[0] = length;
1134         for (int i = 1; i < rank; i++) {
1135           dims[i] = 1; // These aren't relevant to the compiler
1136         }
1137         value = kelem->multi_allocate(rank, dims, CHECK_(true));
1138       } else {
1139         if (strcmp(field_signature, "[B") == 0) {
1140           value = oopFactory::new_byteArray(length, CHECK_(true));
1141         } else if (strcmp(field_signature, "[Z") == 0) {
1142           value = oopFactory::new_boolArray(length, CHECK_(true));
1143         } else if (strcmp(field_signature, "[C") == 0) {
1144           value = oopFactory::new_charArray(length, CHECK_(true));
1145         } else if (strcmp(field_signature, "[S") == 0) {
1146           value = oopFactory::new_shortArray(length, CHECK_(true));
1147         } else if (strcmp(field_signature, "[F") == 0) {
1148           value = oopFactory::new_floatArray(length, CHECK_(true));
1149         } else if (strcmp(field_signature, "[D") == 0) {
1150           value = oopFactory::new_doubleArray(length, CHECK_(true));
1151         } else if (strcmp(field_signature, "[I") == 0) {
1152           value = oopFactory::new_intArray(length, CHECK_(true));
1153         } else if (strcmp(field_signature, "[J") == 0) {
1154           value = oopFactory::new_longArray(length, CHECK_(true));
1155         } else if (field_signature[0] == JVM_SIGNATURE_ARRAY &&
1156                    field_signature[1] == JVM_SIGNATURE_CLASS) {
1157           Klass* kelem = resolve_klass(field_signature + 1, CHECK_(true));
1158           parse_klass(CHECK_(true)); // eat up the array class name
1159           value = oopFactory::new_objArray(kelem, length, CHECK_(true));
1160         } else if (field_signature[0] == JVM_SIGNATURE_ARRAY &&
1161                    field_signature[1] == JVM_SIGNATURE_PRIMITIVE_OBJECT) {
1162           Klass* kelem = resolve_klass(field_signature + 1, CHECK_(true));
1163           parse_klass(CHECK_(true)); // eat up the array class name
1164           value = oopFactory::new_valueArray(kelem, length, CHECK_(true));
1165         } else {
1166           report_error("unhandled array staticfield");
1167         }
1168       }
1169       java_mirror->obj_field_put(fd->offset(), value);
1170       return true;
1171     } else if (strcmp(field_signature, "Ljava/lang/String;") == 0) {
1172       const char* string_value = parse_escaped_string();
1173       Handle value = java_lang_String::create_from_str(string_value, CHECK_(true));
1174       java_mirror->obj_field_put(fd->offset(), value());
1175       return true;
1176     } else if (field_signature[0] == 'L') {
1177       const char* instance = parse_escaped_string();
1178       Klass* k = resolve_klass(instance, CHECK_(true));
1179       oop value = InstanceKlass::cast(k)->allocate_instance(CHECK_(true));
1180       java_mirror->obj_field_put(fd->offset(), value);
1181       return true;
1182     }
1183     return false;
1184   }
1185 
1186   // Initialize a class and fill in the value for a static field.
1187   // This is useful when the compile was dependent on the value of
1188   // static fields but it's impossible to properly rerun the static
1189   // initializer.
1190   void process_staticfield(TRAPS) {
1191     InstanceKlass* k = (InstanceKlass *)parse_klass(CHECK);
1192 
1193     if (k == nullptr || ReplaySuppressInitializers == 0 ||
1194         (ReplaySuppressInitializers == 2 && k->class_loader() == nullptr)) {
1195         skip_remaining();
1196       return;
1197     }
1198 
1199     assert(k->is_initialized(), "must be");
1200 
1201     const char* field_name = parse_escaped_string();
1202     const char* field_signature = parse_string();
1203     fieldDescriptor fd;
1204     Symbol* name = SymbolTable::new_symbol(field_name);
1205     Symbol* sig = SymbolTable::new_symbol(field_signature);
1206     if (!k->find_local_field(name, sig, &fd) ||
1207         !fd.is_static() ||
1208         fd.has_initial_value()) {
1209       report_error(field_name);
1210       return;
1211     }
1212 
1213     oop java_mirror = k->java_mirror();
1214     if (strcmp(field_signature, "I") == 0) {
1215       const char* string_value = parse_escaped_string();
1216       int value = atoi(string_value);
1217       java_mirror->int_field_put(fd.offset(), value);
1218     } else if (strcmp(field_signature, "B") == 0) {
1219       const char* string_value = parse_escaped_string();
1220       int value = atoi(string_value);
1221       java_mirror->byte_field_put(fd.offset(), value);
1222     } else if (strcmp(field_signature, "C") == 0) {
1223       const char* string_value = parse_escaped_string();
1224       int value = atoi(string_value);
1225       java_mirror->char_field_put(fd.offset(), value);
1226     } else if (strcmp(field_signature, "S") == 0) {
1227       const char* string_value = parse_escaped_string();
1228       int value = atoi(string_value);
1229       java_mirror->short_field_put(fd.offset(), value);
1230     } else if (strcmp(field_signature, "Z") == 0) {
1231       const char* string_value = parse_escaped_string();
1232       int value = atoi(string_value);
1233       java_mirror->bool_field_put(fd.offset(), value);
1234     } else if (strcmp(field_signature, "J") == 0) {
1235       const char* string_value = parse_escaped_string();
1236       jlong value;
1237       if (sscanf(string_value, JLONG_FORMAT, &value) != 1) {
1238         fprintf(stderr, "Error parsing long: %s\n", string_value);
1239         return;
1240       }
1241       java_mirror->long_field_put(fd.offset(), value);
1242     } else if (strcmp(field_signature, "F") == 0) {
1243       const char* string_value = parse_escaped_string();
1244       float value = atof(string_value);
1245       java_mirror->float_field_put(fd.offset(), value);
1246     } else if (strcmp(field_signature, "D") == 0) {
1247       const char* string_value = parse_escaped_string();
1248       double value = atof(string_value);
1249       java_mirror->double_field_put(fd.offset(), value);
1250     } else if (field_signature[0] == JVM_SIGNATURE_PRIMITIVE_OBJECT) {
1251       Klass* kelem = resolve_klass(field_signature, CHECK);
1252       InlineKlass* vk = InlineKlass::cast(kelem);
1253       oop value = vk->allocate_instance(CHECK);
1254       InlineTypeFieldInitializer init_fields(value, this);
1255       vk->do_nonstatic_fields(&init_fields);
1256       java_mirror->obj_field_put(fd.offset(), value);
1257     } else {
1258       bool res = process_staticfield_reference(field_signature, java_mirror, &fd, CHECK);
1259       if (!res)  {



































1260         report_error("unhandled staticfield");
1261       }
1262     }
1263   }
1264 
1265 #if INCLUDE_JVMTI
1266   // JvmtiExport <field> <value>
1267   void process_JvmtiExport(TRAPS) {
1268     const char* field = parse_string();
1269     bool value = parse_int("JvmtiExport flag") != 0;
1270     if (strcmp(field, "can_access_local_variables") == 0) {
1271       JvmtiExport::set_can_access_local_variables(value);
1272     } else if (strcmp(field, "can_hotswap_or_post_breakpoint") == 0) {
1273       JvmtiExport::set_can_hotswap_or_post_breakpoint(value);
1274     } else if (strcmp(field, "can_post_on_exceptions") == 0) {
1275       JvmtiExport::set_can_post_on_exceptions(value);
1276     } else {
1277       report_error("Unrecognized JvmtiExport directive");
1278     }
1279   }
< prev index next >