mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8061817: Whitebox.deoptimizeMethod() does not deoptimize all OSR versions of method
Fixed Whitebox.deoptimizeMethod() to deoptimize all OSR versions of the method. Reviewed-by: kvn, iignatyev
This commit is contained in:
parent
8aa05f7690
commit
fe1762fbd6
5 changed files with 119 additions and 12 deletions
|
@ -2845,6 +2845,22 @@ void InstanceKlass::remove_osr_nmethod(nmethod* n) {
|
|||
}
|
||||
}
|
||||
|
||||
int InstanceKlass::mark_osr_nmethods(const Method* m) {
|
||||
// This is a short non-blocking critical region, so the no safepoint check is ok.
|
||||
MutexLockerEx ml(OsrList_lock, Mutex::_no_safepoint_check_flag);
|
||||
nmethod* osr = osr_nmethods_head();
|
||||
int found = 0;
|
||||
while (osr != NULL) {
|
||||
assert(osr->is_osr_method(), "wrong kind of nmethod found in chain");
|
||||
if (osr->method() == m) {
|
||||
osr->mark_for_deoptimization();
|
||||
found++;
|
||||
}
|
||||
osr = osr->osr_link();
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
nmethod* InstanceKlass::lookup_osr_nmethod(const Method* m, int bci, int comp_level, bool match_level) const {
|
||||
// This is a short non-blocking critical region, so the no safepoint check is ok.
|
||||
MutexLockerEx ml(OsrList_lock, Mutex::_no_safepoint_check_flag);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue