# HG changeset patch # User neliasso # Date 1392121793 -3600 # Node ID dd3a135fca388452c158bbfc1a977ca3b68219b2 # Parent 4d686766ac2367f2ae224f54d26c755980d40106 8034188: OSR methods may not be recompiled at proper compilation level Summary: remove_osr_nmethod doesn't check that it is the correct method Reviewed-by: kvn, iveresov diff -r 4d686766ac23 -r dd3a135fca38 hotspot/src/share/vm/oops/instanceKlass.cpp --- a/hotspot/src/share/vm/oops/instanceKlass.cpp Wed Feb 26 07:46:46 2014 +0100 +++ b/hotspot/src/share/vm/oops/instanceKlass.cpp Tue Feb 11 13:29:53 2014 +0100 @@ -2711,7 +2711,7 @@ Method* m = n->method(); // Search for match while(cur != NULL && cur != n) { - if (TieredCompilation) { + if (TieredCompilation && m == cur->method()) { // Find max level before n max_level = MAX2(max_level, cur->comp_level()); } @@ -2733,7 +2733,9 @@ cur = next; while (cur != NULL) { // Find max level after n - max_level = MAX2(max_level, cur->comp_level()); + if (m == cur->method()) { + max_level = MAX2(max_level, cur->comp_level()); + } cur = cur->osr_link(); } m->set_highest_osr_comp_level(max_level);