138 tty->cr(); |
138 tty->cr(); |
139 } |
139 } |
140 } else { |
140 } else { |
141 // Not hot. Check for medium-sized pre-existing nmethod at cold sites. |
141 // Not hot. Check for medium-sized pre-existing nmethod at cold sites. |
142 if (callee_method->has_compiled_code() && |
142 if (callee_method->has_compiled_code() && |
143 callee_method->instructions_size() > InlineSmallCode/4) |
143 callee_method->instructions_size(CompLevel_full_optimization) > InlineSmallCode/4) |
144 return "already compiled into a medium method"; |
144 return "already compiled into a medium method"; |
145 } |
145 } |
146 if (size > max_size) { |
146 if (size > max_size) { |
147 if (max_size > C->max_inline_size()) |
147 if (max_size > C->max_inline_size()) |
148 return "hot method too big"; |
148 return "hot method too big"; |
178 if (!top_method->holder()->is_subclass_of(C->env()->Throwable_klass())) { |
178 if (!top_method->holder()->is_subclass_of(C->env()->Throwable_klass())) { |
179 wci_result->set_profit(wci_result->profit() * 0.1); |
179 wci_result->set_profit(wci_result->profit() * 0.1); |
180 } |
180 } |
181 } |
181 } |
182 |
182 |
183 if (callee_method->has_compiled_code() && callee_method->instructions_size() > InlineSmallCode) { |
183 if (callee_method->has_compiled_code() && callee_method->instructions_size(CompLevel_full_optimization) > InlineSmallCode) { |
184 wci_result->set_profit(wci_result->profit() * 0.1); |
184 wci_result->set_profit(wci_result->profit() * 0.1); |
185 // %%% adjust wci_result->size()? |
185 // %%% adjust wci_result->size()? |
186 } |
186 } |
187 |
187 |
188 return NULL; |
188 return NULL; |
204 return NULL; |
204 return NULL; |
205 } |
205 } |
206 |
206 |
207 // Now perform checks which are heuristic |
207 // Now perform checks which are heuristic |
208 |
208 |
209 if( callee_method->has_compiled_code() && callee_method->instructions_size() > InlineSmallCode ) |
209 if( callee_method->has_compiled_code() && callee_method->instructions_size(CompLevel_full_optimization) > InlineSmallCode ) |
210 return "already compiled into a big method"; |
210 return "already compiled into a big method"; |
211 |
211 |
212 // don't inline exception code unless the top method belongs to an |
212 // don't inline exception code unless the top method belongs to an |
213 // exception class |
213 // exception class |
214 if (caller_tree() != NULL && |
214 if (caller_tree() != NULL && |