comparison src/share/vm/opto/bytecodeInfo.cpp @ 5950:0f4014d7731b

7152961: InlineTree::should_not_inline may exit prematurely Reviewed-by: kvn, never Contributed-by: nils.eliasson@oracle.com
author never
date Tue, 13 Mar 2012 10:03:59 -0700
parents f6f3bb0ee072
children 1d7922586cf6
comparison
equal deleted inserted replaced
5949:2537ebc321d4 5950:0f4014d7731b
255 ciInstanceKlass* k = top->method()->holder(); 255 ciInstanceKlass* k = top->method()->holder();
256 if (!k->is_subclass_of(C->env()->Throwable_klass())) 256 if (!k->is_subclass_of(C->env()->Throwable_klass()))
257 return "exception method"; 257 return "exception method";
258 } 258 }
259 259
260 // use frequency-based objections only for non-trivial methods
261 if (callee_method->code_size_for_inlining() <= MaxTrivialSize) return NULL;
262
263 // don't use counts with -Xcomp or CTW
264 if (UseInterpreter && !CompileTheWorld) {
265
266 if (!callee_method->has_compiled_code() &&
267 !callee_method->was_executed_more_than(0)) {
268 return "never executed";
269 }
270
271 if (is_init_with_ea(callee_method, caller_method, C)) {
272
273 // Escape Analysis: inline all executed constructors
274
275 } else if (!callee_method->was_executed_more_than(MIN2(MinInliningThreshold,
276 CompileThreshold >> 1))) {
277 return "executed < MinInliningThreshold times";
278 }
279 }
280
281 if (callee_method->should_not_inline()) { 260 if (callee_method->should_not_inline()) {
282 return "disallowed by CompilerOracle"; 261 return "disallowed by CompilerOracle";
283 } 262 }
284 263
285 if (UseStringCache) { 264 if (UseStringCache) {
286 // Do not inline StringCache::profile() method used only at the beginning. 265 // Do not inline StringCache::profile() method used only at the beginning.
287 if (callee_method->name() == ciSymbol::profile_name() && 266 if (callee_method->name() == ciSymbol::profile_name() &&
288 callee_method->holder()->name() == ciSymbol::java_lang_StringCache()) { 267 callee_method->holder()->name() == ciSymbol::java_lang_StringCache()) {
289 return "profiling method"; 268 return "profiling method";
269 }
270 }
271
272 // use frequency-based objections only for non-trivial methods
273 if (callee_method->code_size_for_inlining() <= MaxTrivialSize) return NULL;
274
275 // don't use counts with -Xcomp or CTW
276 if (UseInterpreter && !CompileTheWorld) {
277
278 if (!callee_method->has_compiled_code() &&
279 !callee_method->was_executed_more_than(0)) {
280 return "never executed";
281 }
282
283 if (is_init_with_ea(callee_method, caller_method, C)) {
284
285 // Escape Analysis: inline all executed constructors
286
287 } else if (!callee_method->was_executed_more_than(MIN2(MinInliningThreshold,
288 CompileThreshold >> 1))) {
289 return "executed < MinInliningThreshold times";
290 } 290 }
291 } 291 }
292 292
293 return NULL; 293 return NULL;
294 } 294 }