changeset 6058:47f00f3b3900

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
author neliasso
date Tue, 11 Feb 2014 13:29:53 +0100
parents 4e7ee57b57bf
children fae50ee0308d
files src/share/vm/oops/instanceKlass.cpp
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.cpp	Wed Feb 26 07:46:46 2014 +0100
+++ b/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);