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