提交 7f5cdefb 编写于 作者: N neliasso

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
上级 d142da8c
...@@ -2771,7 +2771,7 @@ void InstanceKlass::remove_osr_nmethod(nmethod* n) { ...@@ -2771,7 +2771,7 @@ void InstanceKlass::remove_osr_nmethod(nmethod* n) {
Method* m = n->method(); Method* m = n->method();
// Search for match // Search for match
while(cur != NULL && cur != n) { while(cur != NULL && cur != n) {
if (TieredCompilation) { if (TieredCompilation && m == cur->method()) {
// Find max level before n // Find max level before n
max_level = MAX2(max_level, cur->comp_level()); max_level = MAX2(max_level, cur->comp_level());
} }
...@@ -2793,7 +2793,9 @@ void InstanceKlass::remove_osr_nmethod(nmethod* n) { ...@@ -2793,7 +2793,9 @@ void InstanceKlass::remove_osr_nmethod(nmethod* n) {
cur = next; cur = next;
while (cur != NULL) { while (cur != NULL) {
// Find max level after n // Find max level after n
if (m == cur->method()) {
max_level = MAX2(max_level, cur->comp_level()); max_level = MAX2(max_level, cur->comp_level());
}
cur = cur->osr_link(); cur = cur->osr_link();
} }
m->set_highest_osr_comp_level(max_level); m->set_highest_osr_comp_level(max_level);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册