hotspot/src/share/vm/oops/instanceKlass.cpp
changeset 27434 b4b185d05bb5
parent 27409 03622fc45677
child 27435 58d1380ceacb
equal deleted inserted replaced
27433:b276c91c1264 27434:b4b185d05bb5
  2843     }
  2843     }
  2844     m->set_highest_osr_comp_level(max_level);
  2844     m->set_highest_osr_comp_level(max_level);
  2845   }
  2845   }
  2846 }
  2846 }
  2847 
  2847 
       
  2848 int InstanceKlass::mark_osr_nmethods(const Method* m) {
       
  2849   // This is a short non-blocking critical region, so the no safepoint check is ok.
       
  2850   MutexLockerEx ml(OsrList_lock, Mutex::_no_safepoint_check_flag);
       
  2851   nmethod* osr = osr_nmethods_head();
       
  2852   int found = 0;
       
  2853   while (osr != NULL) {
       
  2854     assert(osr->is_osr_method(), "wrong kind of nmethod found in chain");
       
  2855     if (osr->method() == m) {
       
  2856       osr->mark_for_deoptimization();
       
  2857       found++;
       
  2858     }
       
  2859     osr = osr->osr_link();
       
  2860   }
       
  2861   return found;
       
  2862 }
       
  2863 
  2848 nmethod* InstanceKlass::lookup_osr_nmethod(const Method* m, int bci, int comp_level, bool match_level) const {
  2864 nmethod* InstanceKlass::lookup_osr_nmethod(const Method* m, int bci, int comp_level, bool match_level) const {
  2849   // This is a short non-blocking critical region, so the no safepoint check is ok.
  2865   // This is a short non-blocking critical region, so the no safepoint check is ok.
  2850   MutexLockerEx ml(OsrList_lock, Mutex::_no_safepoint_check_flag);
  2866   MutexLockerEx ml(OsrList_lock, Mutex::_no_safepoint_check_flag);
  2851   nmethod* osr = osr_nmethods_head();
  2867   nmethod* osr = osr_nmethods_head();
  2852   nmethod* best = NULL;
  2868   nmethod* best = NULL;