8034188: OSR methods may not be recompiled at proper compilation level

Tue, 11 Feb 2014 13:29:53 +0100

author
neliasso
date
Tue, 11 Feb 2014 13:29:53 +0100
changeset 6718
bd4d69d9cb7d
parent 6717
09f19d3de485
child 6719
8e20ef014b08

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

src/share/vm/oops/instanceKlass.cpp file | annotate | diff | comparison | revisions
     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);

mercurial