Mercurial > hg > truffle
comparison src/share/vm/ci/ciEnv.cpp @ 4138:82af018d61db
Merge fixes.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sat, 17 Dec 2011 22:03:44 +0100 |
parents | 04b9a2566eec |
children | 957c266d8bc5 |
comparison
equal
deleted
inserted
replaced
4137:04b9a2566eec | 4138:82af018d61db |
---|---|
947 } | 947 } |
948 } | 948 } |
949 | 949 |
950 // ------------------------------------------------------------------ | 950 // ------------------------------------------------------------------ |
951 // ciEnv::register_method | 951 // ciEnv::register_method |
952 void ciEnv::register_method(ciMethod* target, | 952 nmethod* ciEnv::register_method(ciMethod* target, |
953 int entry_bci, | 953 int entry_bci, |
954 CodeOffsets* offsets, | 954 CodeOffsets* offsets, |
955 int orig_pc_offset, | 955 int orig_pc_offset, |
956 CodeBuffer* code_buffer, | 956 CodeBuffer* code_buffer, |
957 int frame_words, | 957 int frame_words, |
1058 | 1058 |
1059 // Record successful registration. | 1059 // Record successful registration. |
1060 // (Put nm into the task handle *before* publishing to the Java heap.) | 1060 // (Put nm into the task handle *before* publishing to the Java heap.) |
1061 if (task() != NULL) task()->set_code(nm); | 1061 if (task() != NULL) task()->set_code(nm); |
1062 | 1062 |
1063 if (install_code) { | 1063 if (entry_bci == InvocationEntryBci) { |
1064 if (entry_bci == InvocationEntryBci) { | 1064 if (TieredCompilation) { |
1065 if (TieredCompilation) { | 1065 // If there is an old version we're done with it |
1066 // If there is an old version we're done with it | 1066 nmethod* old = method->code(); |
1067 nmethod* old = method->code(); | 1067 if (TraceMethodReplacement && old != NULL) { |
1068 if (TraceMethodReplacement && old != NULL) { | |
1069 ResourceMark rm; | |
1070 char *method_name = method->name_and_sig_as_C_string(); | |
1071 tty->print_cr("Replacing method %s", method_name); | |
1072 } | |
1073 if (old != NULL ) { | |
1074 old->make_not_entrant(); | |
1075 } | |
1076 } | |
1077 if (TraceNMethodInstalls ) { | |
1078 ResourceMark rm; | 1068 ResourceMark rm; |
1079 char *method_name = method->name_and_sig_as_C_string(); | 1069 char *method_name = method->name_and_sig_as_C_string(); |
1080 ttyLocker ttyl; | 1070 tty->print_cr("Replacing method %s", method_name); |
1081 tty->print_cr("Installing method (%d) %s ", | |
1082 comp_level, | |
1083 method_name); | |
1084 } | 1071 } |
1085 // Allow the code to be executed | 1072 if (old != NULL ) { |
1086 method->set_code(method, nm); | 1073 old->make_not_entrant(); |
1087 } else { | |
1088 if (TraceNMethodInstalls ) { | |
1089 ResourceMark rm; | |
1090 char *method_name = method->name_and_sig_as_C_string(); | |
1091 ttyLocker ttyl; | |
1092 tty->print_cr("Installing osr method (%d) %s @ %d", | |
1093 comp_level, | |
1094 method_name, | |
1095 entry_bci); | |
1096 } | 1074 } |
1097 instanceKlass::cast(method->method_holder())->add_osr_nmethod(nm); | |
1098 | |
1099 } | 1075 } |
1076 if (TraceNMethodInstalls ) { | |
1077 ResourceMark rm; | |
1078 char *method_name = method->name_and_sig_as_C_string(); | |
1079 ttyLocker ttyl; | |
1080 tty->print_cr("Installing method (%d) %s ", | |
1081 comp_level, | |
1082 method_name); | |
1083 } | |
1084 // Allow the code to be executed | |
1085 method->set_code(method, nm); | |
1086 } else { | |
1087 if (TraceNMethodInstalls ) { | |
1088 ResourceMark rm; | |
1089 char *method_name = method->name_and_sig_as_C_string(); | |
1090 ttyLocker ttyl; | |
1091 tty->print_cr("Installing osr method (%d) %s @ %d", | |
1092 comp_level, | |
1093 method_name, | |
1094 entry_bci); | |
1095 } | |
1096 instanceKlass::cast(method->method_holder())->add_osr_nmethod(nm); | |
1097 | |
1100 } | 1098 } |
1101 } | 1099 } |
1102 } | 1100 } |
1103 // JVMTI -- compiled method notification (must be done outside lock) | 1101 // JVMTI -- compiled method notification (must be done outside lock) |
1104 if (nm != NULL) { | 1102 if (nm != NULL) { |