Mercurial > hg > truffle
comparison src/share/vm/opto/bytecodeInfo.cpp @ 6988:2cb439954abf
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Mon, 19 Nov 2012 15:36:13 +0100 |
parents | e522a00b91aa bd7a7ce2e264 |
children | 989155e2d07a |
comparison
equal
deleted
inserted
replaced
6963:dd0dd0321e2a | 6988:2cb439954abf |
---|---|
21 * questions. | 21 * questions. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
26 #include "ci/ciReplay.hpp" | |
26 #include "classfile/systemDictionary.hpp" | 27 #include "classfile/systemDictionary.hpp" |
27 #include "classfile/vmSymbols.hpp" | 28 #include "classfile/vmSymbols.hpp" |
28 #include "compiler/compileBroker.hpp" | 29 #include "compiler/compileBroker.hpp" |
29 #include "compiler/compileLog.hpp" | 30 #include "compiler/compileLog.hpp" |
30 #include "interpreter/linkResolver.hpp" | 31 #include "interpreter/linkResolver.hpp" |
148 tty->cr(); | 149 tty->cr(); |
149 } | 150 } |
150 } else { | 151 } else { |
151 // Not hot. Check for medium-sized pre-existing nmethod at cold sites. | 152 // Not hot. Check for medium-sized pre-existing nmethod at cold sites. |
152 if (callee_method->has_compiled_code() && | 153 if (callee_method->has_compiled_code() && |
153 callee_method->instructions_size(CompLevel_full_optimization) > inline_small_code_size) | 154 callee_method->instructions_size() > inline_small_code_size) |
154 return "already compiled into a medium method"; | 155 return "already compiled into a medium method"; |
155 } | 156 } |
156 if (size > max_inline_size) { | 157 if (size > max_inline_size) { |
157 if (max_inline_size > default_max_inline_size) | 158 if (max_inline_size > default_max_inline_size) |
158 return "hot method too big"; | 159 return "hot method too big"; |
190 wci_result->set_profit(wci_result->profit() * 0.1); | 191 wci_result->set_profit(wci_result->profit() * 0.1); |
191 } | 192 } |
192 } | 193 } |
193 | 194 |
194 if (callee_method->has_compiled_code() && | 195 if (callee_method->has_compiled_code() && |
195 callee_method->instructions_size(CompLevel_full_optimization) > InlineSmallCode) { | 196 callee_method->instructions_size() > InlineSmallCode) { |
196 wci_result->set_profit(wci_result->profit() * 0.1); | 197 wci_result->set_profit(wci_result->profit() * 0.1); |
197 // %%% adjust wci_result->size()? | 198 // %%% adjust wci_result->size()? |
198 } | 199 } |
199 | 200 |
200 return NULL; | 201 return NULL; |
217 } | 218 } |
218 | 219 |
219 // Now perform checks which are heuristic | 220 // Now perform checks which are heuristic |
220 | 221 |
221 if (callee_method->has_compiled_code() && | 222 if (callee_method->has_compiled_code() && |
222 callee_method->instructions_size(CompLevel_full_optimization) > InlineSmallCode) { | 223 callee_method->instructions_size() > InlineSmallCode) { |
223 return "already compiled into a big method"; | 224 return "already compiled into a big method"; |
224 } | 225 } |
225 | 226 |
226 // don't inline exception code unless the top method belongs to an | 227 // don't inline exception code unless the top method belongs to an |
227 // exception class | 228 // exception class |
235 } | 236 } |
236 | 237 |
237 if (callee_method->should_not_inline()) { | 238 if (callee_method->should_not_inline()) { |
238 return "disallowed by CompilerOracle"; | 239 return "disallowed by CompilerOracle"; |
239 } | 240 } |
241 | |
242 #ifndef PRODUCT | |
243 if (ciReplay::should_not_inline(callee_method)) { | |
244 return "disallowed by ciReplay"; | |
245 } | |
246 #endif | |
240 | 247 |
241 if (UseStringCache) { | 248 if (UseStringCache) { |
242 // Do not inline StringCache::profile() method used only at the beginning. | 249 // Do not inline StringCache::profile() method used only at the beginning. |
243 if (callee_method->name() == ciSymbol::profile_name() && | 250 if (callee_method->name() == ciSymbol::profile_name() && |
244 callee_method->holder()->name() == ciSymbol::java_lang_StringCache()) { | 251 callee_method->holder()->name() == ciSymbol::java_lang_StringCache()) { |