src/share/vm/opto/bytecodeInfo.cpp

changeset 4267
bd7a7ce2e264
parent 4164
d804e148cff8
child 4357
ad5dd04754ee
equal deleted inserted replaced
4260:3be318ecfae5 4267:bd7a7ce2e264
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;
214 } 215 }
215 216
216 // Now perform checks which are heuristic 217 // Now perform checks which are heuristic
217 218
218 if (callee_method->has_compiled_code() && 219 if (callee_method->has_compiled_code() &&
219 callee_method->instructions_size(CompLevel_full_optimization) > InlineSmallCode) { 220 callee_method->instructions_size() > InlineSmallCode) {
220 return "already compiled into a big method"; 221 return "already compiled into a big method";
221 } 222 }
222 223
223 // don't inline exception code unless the top method belongs to an 224 // don't inline exception code unless the top method belongs to an
224 // exception class 225 // exception class
232 } 233 }
233 234
234 if (callee_method->should_not_inline()) { 235 if (callee_method->should_not_inline()) {
235 return "disallowed by CompilerOracle"; 236 return "disallowed by CompilerOracle";
236 } 237 }
238
239 #ifndef PRODUCT
240 if (ciReplay::should_not_inline(callee_method)) {
241 return "disallowed by ciReplay";
242 }
243 #endif
237 244
238 if (UseStringCache) { 245 if (UseStringCache) {
239 // Do not inline StringCache::profile() method used only at the beginning. 246 // Do not inline StringCache::profile() method used only at the beginning.
240 if (callee_method->name() == ciSymbol::profile_name() && 247 if (callee_method->name() == ciSymbol::profile_name() &&
241 callee_method->holder()->name() == ciSymbol::java_lang_StringCache()) { 248 callee_method->holder()->name() == ciSymbol::java_lang_StringCache()) {

mercurial