2163 if (cnt >= nof_interfaces) {
2164 THROW_0(vmSymbols::java_lang_IncompatibleClassChangeError());
2165 }
2166
2167 klassOop ik = ioe->interface_klass();
2168 if (ik == holder) break;
2169 }
2170
2171 itableMethodEntry* ime = ioe->first_method_entry(as_klassOop());
2172 methodOop m = ime[index].method();
2173 if (m == NULL) {
2174 THROW_0(vmSymbols::java_lang_AbstractMethodError());
2175 }
2176 return m;
2177 }
2178
2179 // On-stack replacement stuff
2180 void instanceKlass::add_osr_nmethod(nmethod* n) {
2181 // only one compilation can be active
2182 NEEDS_CLEANUP
2183 // This is a short non-blocking critical region, so the no safepoint check is ok.
2184 OsrList_lock->lock_without_safepoint_check();
2185 assert(n->is_osr_method(), "wrong kind of nmethod");
2186 n->set_osr_link(osr_nmethods_head());
2187 set_osr_nmethods_head(n);
2188 // Raise the highest osr level if necessary
2189 if (TieredCompilation) {
2190 methodOop m = n->method();
2191 m->set_highest_osr_comp_level(MAX2(m->highest_osr_comp_level(), n->comp_level()));
2192 }
2193 // Remember to unlock again
2194 OsrList_lock->unlock();
2195
2196 // Get rid of the osr methods for the same bci that have lower levels.
2197 if (TieredCompilation) {
2198 for (int l = CompLevel_limited_profile; l < n->comp_level(); l++) {
2199 nmethod *inv = lookup_osr_nmethod(n->method(), n->osr_entry_bci(), l, true);
2200 if (inv != NULL && inv->is_in_use()) {
2201 inv->make_not_entrant();
2202 }
|
2163 if (cnt >= nof_interfaces) {
2164 THROW_0(vmSymbols::java_lang_IncompatibleClassChangeError());
2165 }
2166
2167 klassOop ik = ioe->interface_klass();
2168 if (ik == holder) break;
2169 }
2170
2171 itableMethodEntry* ime = ioe->first_method_entry(as_klassOop());
2172 methodOop m = ime[index].method();
2173 if (m == NULL) {
2174 THROW_0(vmSymbols::java_lang_AbstractMethodError());
2175 }
2176 return m;
2177 }
2178
2179 // On-stack replacement stuff
2180 void instanceKlass::add_osr_nmethod(nmethod* n) {
2181 // only one compilation can be active
2182 NEEDS_CLEANUP
2183 #ifdef COMPILER1
2184 // Get rid of the osr methods for the same bci
2185 if (C1ProfileInlining) {
2186 nmethod *inv = lookup_osr_nmethod(n->method(), n->osr_entry_bci(), n->comp_level(), true);
2187 if (inv != NULL && inv->is_in_use()) {
2188 inv->make_not_entrant();
2189 }
2190 }
2191 #endif
2192 // This is a short non-blocking critical region, so the no safepoint check is ok.
2193 OsrList_lock->lock_without_safepoint_check();
2194 assert(n->is_osr_method(), "wrong kind of nmethod");
2195 n->set_osr_link(osr_nmethods_head());
2196 set_osr_nmethods_head(n);
2197 // Raise the highest osr level if necessary
2198 if (TieredCompilation) {
2199 methodOop m = n->method();
2200 m->set_highest_osr_comp_level(MAX2(m->highest_osr_comp_level(), n->comp_level()));
2201 }
2202 // Remember to unlock again
2203 OsrList_lock->unlock();
2204
2205 // Get rid of the osr methods for the same bci that have lower levels.
2206 if (TieredCompilation) {
2207 for (int l = CompLevel_limited_profile; l < n->comp_level(); l++) {
2208 nmethod *inv = lookup_osr_nmethod(n->method(), n->osr_entry_bci(), l, true);
2209 if (inv != NULL && inv->is_in_use()) {
2210 inv->make_not_entrant();
2211 }
|