Mercurial > hg > truffle
comparison src/share/vm/oops/instanceKlass.cpp @ 20611:3c87c13918fb
8061817: Whitebox.deoptimizeMethod() does not deoptimize all OSR versions of method
Summary: Fixed Whitebox.deoptimizeMethod() to deoptimize all OSR versions of the method.
Reviewed-by: kvn, iignatyev
author | thartmann |
---|---|
date | Thu, 30 Oct 2014 13:03:30 +0100 |
parents | 90257dfad6e3 |
children | fe34c5ab0b35 d5b74c583ec1 |
comparison
equal
deleted
inserted
replaced
20610:d4562805b030 | 20611:3c87c13918fb |
---|---|
2888 } | 2888 } |
2889 // Remember to unlock again | 2889 // Remember to unlock again |
2890 OsrList_lock->unlock(); | 2890 OsrList_lock->unlock(); |
2891 } | 2891 } |
2892 | 2892 |
2893 int InstanceKlass::mark_osr_nmethods(const Method* m) { | |
2894 // This is a short non-blocking critical region, so the no safepoint check is ok. | |
2895 MutexLockerEx ml(OsrList_lock, Mutex::_no_safepoint_check_flag); | |
2896 nmethod* osr = osr_nmethods_head(); | |
2897 int found = 0; | |
2898 while (osr != NULL) { | |
2899 assert(osr->is_osr_method(), "wrong kind of nmethod found in chain"); | |
2900 if (osr->method() == m) { | |
2901 osr->mark_for_deoptimization(); | |
2902 found++; | |
2903 } | |
2904 osr = osr->osr_link(); | |
2905 } | |
2906 return found; | |
2907 } | |
2908 | |
2893 nmethod* InstanceKlass::lookup_osr_nmethod(const Method* m, int bci, int comp_level, bool match_level) const { | 2909 nmethod* InstanceKlass::lookup_osr_nmethod(const Method* m, int bci, int comp_level, bool match_level) const { |
2894 // This is a short non-blocking critical region, so the no safepoint check is ok. | 2910 // This is a short non-blocking critical region, so the no safepoint check is ok. |
2895 OsrList_lock->lock_without_safepoint_check(); | 2911 OsrList_lock->lock_without_safepoint_check(); |
2896 nmethod* osr = osr_nmethods_head(); | 2912 nmethod* osr = osr_nmethods_head(); |
2897 nmethod* best = NULL; | 2913 nmethod* best = NULL; |