hotspot/src/share/vm/oops/instanceKlass.cpp
changeset 22920 dd3a135fca38
parent 22916 582da2ed4dfa
child 22929 cb114f3238ef
--- 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);