1.1 --- a/src/share/vm/oops/instanceKlass.cpp Wed Nov 05 08:35:02 2014 +0000 1.2 +++ b/src/share/vm/oops/instanceKlass.cpp Thu Oct 30 13:03:30 2014 +0100 1.3 @@ -2890,6 +2890,22 @@ 1.4 OsrList_lock->unlock(); 1.5 } 1.6 1.7 +int InstanceKlass::mark_osr_nmethods(const Method* m) { 1.8 + // This is a short non-blocking critical region, so the no safepoint check is ok. 1.9 + MutexLockerEx ml(OsrList_lock, Mutex::_no_safepoint_check_flag); 1.10 + nmethod* osr = osr_nmethods_head(); 1.11 + int found = 0; 1.12 + while (osr != NULL) { 1.13 + assert(osr->is_osr_method(), "wrong kind of nmethod found in chain"); 1.14 + if (osr->method() == m) { 1.15 + osr->mark_for_deoptimization(); 1.16 + found++; 1.17 + } 1.18 + osr = osr->osr_link(); 1.19 + } 1.20 + return found; 1.21 +} 1.22 + 1.23 nmethod* InstanceKlass::lookup_osr_nmethod(const Method* m, int bci, int comp_level, bool match_level) const { 1.24 // This is a short non-blocking critical region, so the no safepoint check is ok. 1.25 OsrList_lock->lock_without_safepoint_check();