< prev index next >

src/hotspot/share/ci/ciReplay.cpp

Print this page

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

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

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

 982         case JVM_CONSTANT_Long:
 983         case JVM_CONSTANT_Double:
 984           parsed_two_word = i + 1;
 985 
 986         case JVM_CONSTANT_ClassIndex:
 987         case JVM_CONSTANT_StringIndex:
 988         case JVM_CONSTANT_String:
 989         case JVM_CONSTANT_UnresolvedClassInError:
 990         case JVM_CONSTANT_Fieldref:
 991         case JVM_CONSTANT_Methodref:
 992         case JVM_CONSTANT_InterfaceMethodref:
 993         case JVM_CONSTANT_NameAndType:
 994         case JVM_CONSTANT_Utf8:
 995         case JVM_CONSTANT_Integer:
 996         case JVM_CONSTANT_Float:
 997         case JVM_CONSTANT_MethodHandle:
 998         case JVM_CONSTANT_MethodType:
 999         case JVM_CONSTANT_Dynamic:
1000         case JVM_CONSTANT_InvokeDynamic:
1001           if (tag != cp->tag_at(i).value()) {

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




















































1055     }

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




1099         } else {
1100           report_error("unhandled array staticfield");
1101         }
1102       }























































































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

  24 
  25 #include "precompiled.hpp"
  26 #include "jvm.h"
  27 #include "ci/ciMethodData.hpp"
  28 #include "ci/ciReplay.hpp"
  29 #include "ci/ciSymbol.hpp"
  30 #include "ci/ciKlass.hpp"
  31 #include "ci/ciUtilities.inline.hpp"
  32 #include "classfile/javaClasses.hpp"
  33 #include "classfile/symbolTable.hpp"
  34 #include "classfile/systemDictionary.hpp"
  35 #include "compiler/compilationPolicy.hpp"
  36 #include "compiler/compileBroker.hpp"
  37 #include "interpreter/linkResolver.hpp"
  38 #include "memory/allocation.inline.hpp"
  39 #include "memory/oopFactory.hpp"
  40 #include "memory/resourceArea.hpp"
  41 #include "oops/constantPool.hpp"
  42 #include "oops/cpCache.inline.hpp"
  43 #include "oops/fieldStreams.inline.hpp"
  44 #include "oops/inlineKlass.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/jniHandles.inline.hpp"
  54 #include "runtime/java.hpp"
  55 #include "utilities/copy.hpp"
  56 #include "utilities/macros.hpp"
  57 #include "utilities/utf8.hpp"
  58 
  59 #ifndef PRODUCT
  60 
  61 // ciReplay
  62 
  63 typedef struct _ciMethodDataRecord {
  64   const char* _klass_name;

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

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


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



































1251         report_error("unhandled staticfield");
1252       }
1253     }
1254   }
1255 
1256 #if INCLUDE_JVMTI
1257   // JvmtiExport <field> <value>
1258   void process_JvmtiExport(TRAPS) {
1259     const char* field = parse_string();
1260     bool value = parse_int("JvmtiExport flag") != 0;
1261     if (strcmp(field, "can_access_local_variables") == 0) {
1262       JvmtiExport::set_can_access_local_variables(value);
1263     } else if (strcmp(field, "can_hotswap_or_post_breakpoint") == 0) {
1264       JvmtiExport::set_can_hotswap_or_post_breakpoint(value);
1265     } else if (strcmp(field, "can_post_on_exceptions") == 0) {
1266       JvmtiExport::set_can_post_on_exceptions(value);
1267     } else {
1268       report_error("Unrecognized JvmtiExport directive");
1269     }
1270   }
< prev index next >