# HG changeset patch # User neliasso # Date 1392121793 -3600 # Node ID bd4d69d9cb7dd87bd278482a81fdb00acb56c51e # Parent 09f19d3de485ec84386b93ac392aff2ced4ca70b 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 09f19d3de485 -r bd4d69d9cb7d src/share/vm/oops/instanceKlass.cpp --- a/src/share/vm/oops/instanceKlass.cpp Thu Jun 05 15:55:49 2014 +0200 +++ b/src/share/vm/oops/instanceKlass.cpp Tue Feb 11 13:29:53 2014 +0100 @@ -2771,7 +2771,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()); } @@ -2793,7 +2793,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);