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 |