Mercurial > hg > truffle
comparison src/share/vm/oops/instanceKlass.cpp @ 17975:bd4d69d9cb7d
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 | 78bbf4d43a14 |
children | 52b4284cb496 ce8f6bb717c9 9906d432d6db |
comparison
equal
deleted
inserted
replaced
17974:09f19d3de485 | 17975:bd4d69d9cb7d |
---|---|
2769 nmethod* cur = osr_nmethods_head(); | 2769 nmethod* cur = osr_nmethods_head(); |
2770 int max_level = CompLevel_none; // Find the max comp level excluding n | 2770 int max_level = CompLevel_none; // Find the max comp level excluding n |
2771 Method* m = n->method(); | 2771 Method* m = n->method(); |
2772 // Search for match | 2772 // Search for match |
2773 while(cur != NULL && cur != n) { | 2773 while(cur != NULL && cur != n) { |
2774 if (TieredCompilation) { | 2774 if (TieredCompilation && m == cur->method()) { |
2775 // Find max level before n | 2775 // Find max level before n |
2776 max_level = MAX2(max_level, cur->comp_level()); | 2776 max_level = MAX2(max_level, cur->comp_level()); |
2777 } | 2777 } |
2778 last = cur; | 2778 last = cur; |
2779 cur = cur->osr_link(); | 2779 cur = cur->osr_link(); |
2791 n->set_osr_link(NULL); | 2791 n->set_osr_link(NULL); |
2792 if (TieredCompilation) { | 2792 if (TieredCompilation) { |
2793 cur = next; | 2793 cur = next; |
2794 while (cur != NULL) { | 2794 while (cur != NULL) { |
2795 // Find max level after n | 2795 // Find max level after n |
2796 max_level = MAX2(max_level, cur->comp_level()); | 2796 if (m == cur->method()) { |
2797 max_level = MAX2(max_level, cur->comp_level()); | |
2798 } | |
2797 cur = cur->osr_link(); | 2799 cur = cur->osr_link(); |
2798 } | 2800 } |
2799 m->set_highest_osr_comp_level(max_level); | 2801 m->set_highest_osr_comp_level(max_level); |
2800 } | 2802 } |
2801 // Remember to unlock again | 2803 // Remember to unlock again |