1.1 --- a/src/share/vm/oops/instanceKlass.cpp Thu Jun 05 15:55:49 2014 +0200 1.2 +++ b/src/share/vm/oops/instanceKlass.cpp Tue Feb 11 13:29:53 2014 +0100 1.3 @@ -2771,7 +2771,7 @@ 1.4 Method* m = n->method(); 1.5 // Search for match 1.6 while(cur != NULL && cur != n) { 1.7 - if (TieredCompilation) { 1.8 + if (TieredCompilation && m == cur->method()) { 1.9 // Find max level before n 1.10 max_level = MAX2(max_level, cur->comp_level()); 1.11 } 1.12 @@ -2793,7 +2793,9 @@ 1.13 cur = next; 1.14 while (cur != NULL) { 1.15 // Find max level after n 1.16 - max_level = MAX2(max_level, cur->comp_level()); 1.17 + if (m == cur->method()) { 1.18 + max_level = MAX2(max_level, cur->comp_level()); 1.19 + } 1.20 cur = cur->osr_link(); 1.21 } 1.22 m->set_highest_osr_comp_level(max_level);