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.inline.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 "oops/resolvedIndyEntry.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;
960 ConstantPool* cp = k->constants();
961 if (length != cp->length()) {
962 report_error("constant pool length mismatch: wrong class files?");
963 return;
964 }
965
966 int parsed_two_word = 0;
967 for (int i = 1; i < length; i++) {
968 int tag = parse_int("tag");
969 if (had_error()) {
970 return;
971 }
972 switch (cp->tag_at(i).value()) {
973 case JVM_CONSTANT_UnresolvedClass: {
974 if (tag == JVM_CONSTANT_Class) {
975 tty->print_cr("Resolving klass %s at %d", cp->klass_name_at(i)->as_utf8(), i);
976 Klass* k = cp->klass_at(i, CHECK);
977 }
978 break;
979 }
980 case JVM_CONSTANT_Long:
981 case JVM_CONSTANT_Double:
982 parsed_two_word = i + 1;
983
984 case JVM_CONSTANT_ClassIndex:
985 case JVM_CONSTANT_StringIndex:
986 case JVM_CONSTANT_String:
987 case JVM_CONSTANT_UnresolvedClassInError:
988 case JVM_CONSTANT_Fieldref:
989 case JVM_CONSTANT_Methodref:
990 case JVM_CONSTANT_InterfaceMethodref:
991 case JVM_CONSTANT_NameAndType:
992 case JVM_CONSTANT_Utf8:
993 case JVM_CONSTANT_Integer:
994 case JVM_CONSTANT_Float:
995 case JVM_CONSTANT_MethodHandle:
996 case JVM_CONSTANT_MethodType:
997 case JVM_CONSTANT_Dynamic:
998 case JVM_CONSTANT_InvokeDynamic:
999 if (tag != cp->tag_at(i).value()) {
1006 if (tag == JVM_CONSTANT_UnresolvedClass) {
1007 Klass* k = cp->klass_at(i, CHECK);
1008 tty->print_cr("Warning: entry was unresolved in the replay data: %s", k->name()->as_utf8());
1009 } else if (tag != JVM_CONSTANT_Class) {
1010 report_error("Unexpected tag");
1011 return;
1012 }
1013 break;
1014
1015 case 0:
1016 if (parsed_two_word == i) continue;
1017
1018 default:
1019 fatal("Unexpected tag: %d", cp->tag_at(i).value());
1020 break;
1021 }
1022
1023 }
1024 }
1025
1026 // staticfield <klass> <name> <signature> <value>
1027 //
1028 // Initialize a class and fill in the value for a static field.
1029 // This is useful when the compile was dependent on the value of
1030 // static fields but it's impossible to properly rerun the static
1031 // initializer.
1032 void process_staticfield(TRAPS) {
1033 InstanceKlass* k = (InstanceKlass *)parse_klass(CHECK);
1034
1035 if (k == nullptr || ReplaySuppressInitializers == 0 ||
1036 (ReplaySuppressInitializers == 2 && k->class_loader() == nullptr)) {
1037 skip_remaining();
1038 return;
1039 }
1040
1041 assert(k->is_initialized(), "must be");
1042
1043 const char* field_name = parse_escaped_string();
1044 const char* field_signature = parse_string();
1045 fieldDescriptor fd;
1046 Symbol* name = SymbolTable::new_symbol(field_name);
1047 Symbol* sig = SymbolTable::new_symbol(field_signature);
1048 if (!k->find_local_field(name, sig, &fd) ||
1049 !fd.is_static() ||
1050 fd.has_initial_value()) {
1051 report_error(field_name);
1052 return;
1053 }
1054
1055 oop java_mirror = k->java_mirror();
1056 if (field_signature[0] == JVM_SIGNATURE_ARRAY) {
1057 int length = parse_int("array length");
1058 oop value = nullptr;
1059
1060 if (field_signature[1] == JVM_SIGNATURE_ARRAY) {
1061 // multi dimensional array
1062 ArrayKlass* kelem = (ArrayKlass *)parse_klass(CHECK);
1063 if (kelem == nullptr) {
1064 return;
1065 }
1066 int rank = 0;
1067 while (field_signature[rank] == JVM_SIGNATURE_ARRAY) {
1068 rank++;
1069 }
1070 jint* dims = NEW_RESOURCE_ARRAY(jint, rank);
1071 dims[0] = length;
1072 for (int i = 1; i < rank; i++) {
1073 dims[i] = 1; // These aren't relevant to the compiler
1074 }
1075 value = kelem->multi_allocate(rank, dims, CHECK);
1076 } else {
1077 if (strcmp(field_signature, "[B") == 0) {
1078 value = oopFactory::new_byteArray(length, CHECK);
1079 } else if (strcmp(field_signature, "[Z") == 0) {
1080 value = oopFactory::new_boolArray(length, CHECK);
1081 } else if (strcmp(field_signature, "[C") == 0) {
1082 value = oopFactory::new_charArray(length, CHECK);
1083 } else if (strcmp(field_signature, "[S") == 0) {
1084 value = oopFactory::new_shortArray(length, CHECK);
1085 } else if (strcmp(field_signature, "[F") == 0) {
1086 value = oopFactory::new_floatArray(length, CHECK);
1087 } else if (strcmp(field_signature, "[D") == 0) {
1088 value = oopFactory::new_doubleArray(length, CHECK);
1089 } else if (strcmp(field_signature, "[I") == 0) {
1090 value = oopFactory::new_intArray(length, CHECK);
1091 } else if (strcmp(field_signature, "[J") == 0) {
1092 value = oopFactory::new_longArray(length, CHECK);
1093 } else if (field_signature[0] == JVM_SIGNATURE_ARRAY &&
1094 field_signature[1] == JVM_SIGNATURE_CLASS) {
1095 parse_klass(CHECK); // eat up the array class name
1096 Klass* kelem = resolve_klass(field_signature + 1, CHECK);
1097 value = oopFactory::new_objArray(kelem, length, CHECK);
1098 } else {
1099 report_error("unhandled array staticfield");
1100 }
1101 }
1102 java_mirror->obj_field_put(fd.offset(), value);
1103 } else {
1104 const char* string_value = parse_escaped_string();
1105 if (strcmp(field_signature, "I") == 0) {
1106 int value = atoi(string_value);
1107 java_mirror->int_field_put(fd.offset(), value);
1108 } else if (strcmp(field_signature, "B") == 0) {
1109 int value = atoi(string_value);
1110 java_mirror->byte_field_put(fd.offset(), value);
1111 } else if (strcmp(field_signature, "C") == 0) {
1112 int value = atoi(string_value);
1113 java_mirror->char_field_put(fd.offset(), value);
1114 } else if (strcmp(field_signature, "S") == 0) {
1115 int value = atoi(string_value);
1116 java_mirror->short_field_put(fd.offset(), value);
1117 } else if (strcmp(field_signature, "Z") == 0) {
1118 int value = atoi(string_value);
1119 java_mirror->bool_field_put(fd.offset(), value);
1120 } else if (strcmp(field_signature, "J") == 0) {
1121 jlong value;
1122 if (sscanf(string_value, JLONG_FORMAT, &value) != 1) {
1123 fprintf(stderr, "Error parsing long: %s\n", string_value);
1124 return;
1125 }
1126 java_mirror->long_field_put(fd.offset(), value);
1127 } else if (strcmp(field_signature, "F") == 0) {
1128 float value = atof(string_value);
1129 java_mirror->float_field_put(fd.offset(), value);
1130 } else if (strcmp(field_signature, "D") == 0) {
1131 double value = atof(string_value);
1132 java_mirror->double_field_put(fd.offset(), value);
1133 } else if (strcmp(field_signature, "Ljava/lang/String;") == 0) {
1134 Handle value = java_lang_String::create_from_str(string_value, CHECK);
1135 java_mirror->obj_field_put(fd.offset(), value());
1136 } else if (field_signature[0] == JVM_SIGNATURE_CLASS) {
1137 Klass* k = resolve_klass(string_value, CHECK);
1138 oop value = InstanceKlass::cast(k)->allocate_instance(CHECK);
1139 java_mirror->obj_field_put(fd.offset(), value);
1140 } else {
1141 report_error("unhandled staticfield");
1142 }
1143 }
1144 }
1145
1146 #if INCLUDE_JVMTI
1147 // JvmtiExport <field> <value>
1148 void process_JvmtiExport(TRAPS) {
1149 const char* field = parse_string();
1150 bool value = parse_int("JvmtiExport flag") != 0;
1151 if (strcmp(field, "can_access_local_variables") == 0) {
1152 JvmtiExport::set_can_access_local_variables(value);
1153 } else if (strcmp(field, "can_hotswap_or_post_breakpoint") == 0) {
1154 JvmtiExport::set_can_hotswap_or_post_breakpoint(value);
1155 } else if (strcmp(field, "can_post_on_exceptions") == 0) {
1156 JvmtiExport::set_can_post_on_exceptions(value);
1157 } else {
1158 report_error("Unrecognized JvmtiExport directive");
1159 }
1160 }
|
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.inline.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 "oops/resolvedIndyEntry.hpp"
50 #include "prims/jvmtiExport.hpp"
51 #include "prims/methodHandles.hpp"
52 #include "runtime/fieldDescriptor.inline.hpp"
53 #include "runtime/globals_extension.hpp"
54 #include "runtime/handles.inline.hpp"
55 #include "runtime/java.hpp"
56 #include "runtime/jniHandles.inline.hpp"
57 #include "runtime/threads.hpp"
58 #include "utilities/copy.hpp"
59 #include "utilities/macros.hpp"
60 #include "utilities/utf8.hpp"
61
62 // ciReplay
63
64 typedef struct _ciMethodDataRecord {
65 const char* _klass_name;
961 ConstantPool* cp = k->constants();
962 if (length != cp->length()) {
963 report_error("constant pool length mismatch: wrong class files?");
964 return;
965 }
966
967 int parsed_two_word = 0;
968 for (int i = 1; i < length; i++) {
969 int tag = parse_int("tag");
970 if (had_error()) {
971 return;
972 }
973 switch (cp->tag_at(i).value()) {
974 case JVM_CONSTANT_UnresolvedClass: {
975 if (tag == JVM_CONSTANT_Class) {
976 tty->print_cr("Resolving klass %s at %d", cp->klass_name_at(i)->as_utf8(), i);
977 Klass* k = cp->klass_at(i, CHECK);
978 }
979 break;
980 }
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 class InlineTypeFieldInitializer : public FieldClosure {
1029 oop _vt;
1030 CompileReplay* _replay;
1031 public:
1032 InlineTypeFieldInitializer(oop vt, CompileReplay* replay)
1033 : _vt(vt), _replay(replay) {}
1034
1035 void do_field(fieldDescriptor* fd) {
1036 BasicType bt = fd->field_type();
1037 const char* string_value = fd->is_null_free_inline_type() ? nullptr : _replay->parse_escaped_string();
1038 switch (bt) {
1039 case T_BYTE: {
1040 int value = atoi(string_value);
1041 _vt->byte_field_put(fd->offset(), value);
1042 break;
1043 }
1044 case T_BOOLEAN: {
1045 int value = atoi(string_value);
1046 _vt->bool_field_put(fd->offset(), value);
1047 break;
1048 }
1049 case T_SHORT: {
1050 int value = atoi(string_value);
1051 _vt->short_field_put(fd->offset(), value);
1052 break;
1053 }
1054 case T_CHAR: {
1055 int value = atoi(string_value);
1056 _vt->char_field_put(fd->offset(), value);
1057 break;
1058 }
1059 case T_INT: {
1060 int value = atoi(string_value);
1061 _vt->int_field_put(fd->offset(), value);
1062 break;
1063 }
1064 case T_LONG: {
1065 jlong value;
1066 if (sscanf(string_value, JLONG_FORMAT, &value) != 1) {
1067 fprintf(stderr, "Error parsing long: %s\n", string_value);
1068 break;
1069 }
1070 _vt->long_field_put(fd->offset(), value);
1071 break;
1072 }
1073 case T_FLOAT: {
1074 float value = atof(string_value);
1075 _vt->float_field_put(fd->offset(), value);
1076 break;
1077 }
1078 case T_DOUBLE: {
1079 double value = atof(string_value);
1080 _vt->double_field_put(fd->offset(), value);
1081 break;
1082 }
1083 case T_ARRAY:
1084 case T_OBJECT:
1085 if (!fd->is_null_free_inline_type()) {
1086 JavaThread* THREAD = JavaThread::current();
1087 bool res = _replay->process_staticfield_reference(string_value, _vt, fd, THREAD);
1088 assert(res, "should succeed for arrays & objects");
1089 break;
1090 } else {
1091 InlineKlass* vk = InlineKlass::cast(fd->field_holder()->get_inline_type_field_klass(fd->index()));
1092 if (fd->is_flat()) {
1093 int field_offset = fd->offset() - vk->first_field_offset();
1094 oop obj = cast_to_oop(cast_from_oop<address>(_vt) + field_offset);
1095 InlineTypeFieldInitializer init_fields(obj, _replay);
1096 vk->do_nonstatic_fields(&init_fields);
1097 } else {
1098 oop value = vk->allocate_instance(JavaThread::current());
1099 _vt->obj_field_put(fd->offset(), value);
1100 }
1101 break;
1102 }
1103 default: {
1104 fatal("Unhandled type: %s", type2name(bt));
1105 }
1106 }
1107 }
1108 };
1109
1110 bool process_staticfield_reference(const char* field_signature, oop java_mirror, fieldDescriptor* fd, TRAPS) {
1111 if (field_signature[0] == JVM_SIGNATURE_ARRAY) {
1112 int length = parse_int("array length");
1113 oop value = nullptr;
1114
1115 if (field_signature[1] == JVM_SIGNATURE_ARRAY) {
1116 // multi dimensional array
1117 Klass* k = resolve_klass(field_signature, CHECK_(true));
1118 ArrayKlass* kelem = (ArrayKlass *)k;
1119 int rank = 0;
1120 while (field_signature[rank] == JVM_SIGNATURE_ARRAY) {
1121 rank++;
1122 }
1123 jint* dims = NEW_RESOURCE_ARRAY(jint, rank);
1124 dims[0] = length;
1125 for (int i = 1; i < rank; i++) {
1126 dims[i] = 1; // These aren't relevant to the compiler
1127 }
1128 value = kelem->multi_allocate(rank, dims, CHECK_(true));
1129 } else {
1130 if (strcmp(field_signature, "[B") == 0) {
1131 value = oopFactory::new_byteArray(length, CHECK_(true));
1132 } else if (strcmp(field_signature, "[Z") == 0) {
1133 value = oopFactory::new_boolArray(length, CHECK_(true));
1134 } else if (strcmp(field_signature, "[C") == 0) {
1135 value = oopFactory::new_charArray(length, CHECK_(true));
1136 } else if (strcmp(field_signature, "[S") == 0) {
1137 value = oopFactory::new_shortArray(length, CHECK_(true));
1138 } else if (strcmp(field_signature, "[F") == 0) {
1139 value = oopFactory::new_floatArray(length, CHECK_(true));
1140 } else if (strcmp(field_signature, "[D") == 0) {
1141 value = oopFactory::new_doubleArray(length, CHECK_(true));
1142 } else if (strcmp(field_signature, "[I") == 0) {
1143 value = oopFactory::new_intArray(length, CHECK_(true));
1144 } else if (strcmp(field_signature, "[J") == 0) {
1145 value = oopFactory::new_longArray(length, CHECK_(true));
1146 } else if (field_signature[0] == JVM_SIGNATURE_ARRAY &&
1147 field_signature[1] == JVM_SIGNATURE_CLASS) {
1148 Klass* kelem = resolve_klass(field_signature + 1, CHECK_(true));
1149 parse_klass(CHECK_(true)); // eat up the array class name
1150 value = oopFactory::new_objArray(kelem, length, CHECK_(true));
1151 } else if (field_signature[0] == JVM_SIGNATURE_ARRAY) {
1152 Klass* kelem = resolve_klass(field_signature + 1, CHECK_(true));
1153 parse_klass(CHECK_(true)); // eat up the array class name
1154 value = oopFactory::new_valueArray(kelem, length, CHECK_(true));
1155 } else {
1156 report_error("unhandled array staticfield");
1157 }
1158 }
1159 java_mirror->obj_field_put(fd->offset(), value);
1160 return true;
1161 } else if (strcmp(field_signature, "Ljava/lang/String;") == 0) {
1162 const char* string_value = parse_escaped_string();
1163 Handle value = java_lang_String::create_from_str(string_value, CHECK_(true));
1164 java_mirror->obj_field_put(fd->offset(), value());
1165 return true;
1166 } else if (field_signature[0] == 'L') {
1167 const char* instance = parse_escaped_string();
1168 Klass* k = resolve_klass(instance, CHECK_(true));
1169 oop value = InstanceKlass::cast(k)->allocate_instance(CHECK_(true));
1170 java_mirror->obj_field_put(fd->offset(), value);
1171 return true;
1172 }
1173 return false;
1174 }
1175
1176 // Initialize a class and fill in the value for a static field.
1177 // This is useful when the compile was dependent on the value of
1178 // static fields but it's impossible to properly rerun the static
1179 // initializer.
1180 void process_staticfield(TRAPS) {
1181 InstanceKlass* k = (InstanceKlass *)parse_klass(CHECK);
1182
1183 if (k == nullptr || ReplaySuppressInitializers == 0 ||
1184 (ReplaySuppressInitializers == 2 && k->class_loader() == nullptr)) {
1185 skip_remaining();
1186 return;
1187 }
1188
1189 assert(k->is_initialized(), "must be");
1190
1191 const char* field_name = parse_escaped_string();
1192 const char* field_signature = parse_string();
1193 fieldDescriptor fd;
1194 Symbol* name = SymbolTable::new_symbol(field_name);
1195 Symbol* sig = SymbolTable::new_symbol(field_signature);
1196 if (!k->find_local_field(name, sig, &fd) ||
1197 !fd.is_static() ||
1198 fd.has_initial_value()) {
1199 report_error(field_name);
1200 return;
1201 }
1202
1203 oop java_mirror = k->java_mirror();
1204 if (strcmp(field_signature, "I") == 0) {
1205 const char* string_value = parse_escaped_string();
1206 int value = atoi(string_value);
1207 java_mirror->int_field_put(fd.offset(), value);
1208 } else if (strcmp(field_signature, "B") == 0) {
1209 const char* string_value = parse_escaped_string();
1210 int value = atoi(string_value);
1211 java_mirror->byte_field_put(fd.offset(), value);
1212 } else if (strcmp(field_signature, "C") == 0) {
1213 const char* string_value = parse_escaped_string();
1214 int value = atoi(string_value);
1215 java_mirror->char_field_put(fd.offset(), value);
1216 } else if (strcmp(field_signature, "S") == 0) {
1217 const char* string_value = parse_escaped_string();
1218 int value = atoi(string_value);
1219 java_mirror->short_field_put(fd.offset(), value);
1220 } else if (strcmp(field_signature, "Z") == 0) {
1221 const char* string_value = parse_escaped_string();
1222 int value = atoi(string_value);
1223 java_mirror->bool_field_put(fd.offset(), value);
1224 } else if (strcmp(field_signature, "J") == 0) {
1225 const char* string_value = parse_escaped_string();
1226 jlong value;
1227 if (sscanf(string_value, JLONG_FORMAT, &value) != 1) {
1228 fprintf(stderr, "Error parsing long: %s\n", string_value);
1229 return;
1230 }
1231 java_mirror->long_field_put(fd.offset(), value);
1232 } else if (strcmp(field_signature, "F") == 0) {
1233 const char* string_value = parse_escaped_string();
1234 float value = atof(string_value);
1235 java_mirror->float_field_put(fd.offset(), value);
1236 } else if (strcmp(field_signature, "D") == 0) {
1237 const char* string_value = parse_escaped_string();
1238 double value = atof(string_value);
1239 java_mirror->double_field_put(fd.offset(), value);
1240 } else if (fd.is_null_free_inline_type()) {
1241 Klass* kelem = resolve_klass(field_signature, CHECK);
1242 InlineKlass* vk = InlineKlass::cast(kelem);
1243 oop value = vk->allocate_instance(CHECK);
1244 InlineTypeFieldInitializer init_fields(value, this);
1245 vk->do_nonstatic_fields(&init_fields);
1246 java_mirror->obj_field_put(fd.offset(), value);
1247 } else {
1248 bool res = process_staticfield_reference(field_signature, java_mirror, &fd, CHECK);
1249 if (!res) {
1250 report_error("unhandled staticfield");
1251 }
1252 }
1253 }
1254
1255 #if INCLUDE_JVMTI
1256 // JvmtiExport <field> <value>
1257 void process_JvmtiExport(TRAPS) {
1258 const char* field = parse_string();
1259 bool value = parse_int("JvmtiExport flag") != 0;
1260 if (strcmp(field, "can_access_local_variables") == 0) {
1261 JvmtiExport::set_can_access_local_variables(value);
1262 } else if (strcmp(field, "can_hotswap_or_post_breakpoint") == 0) {
1263 JvmtiExport::set_can_hotswap_or_post_breakpoint(value);
1264 } else if (strcmp(field, "can_post_on_exceptions") == 0) {
1265 JvmtiExport::set_can_post_on_exceptions(value);
1266 } else {
1267 report_error("Unrecognized JvmtiExport directive");
1268 }
1269 }
|