1.1 --- a/src/share/vm/opto/bytecodeInfo.cpp Mon May 06 19:49:23 2013 -0700 1.2 +++ b/src/share/vm/opto/bytecodeInfo.cpp Wed May 08 15:08:01 2013 -0700 1.3 @@ -97,6 +97,11 @@ 1.4 ); 1.5 } 1.6 1.7 +static bool is_unboxing_method(ciMethod* callee_method, Compile* C) { 1.8 + // Force inlining unboxing accessor. 1.9 + return C->eliminate_boxing() && callee_method->is_unboxing_method(); 1.10 +} 1.11 + 1.12 // positive filter: should callee be inlined? 1.13 bool InlineTree::should_inline(ciMethod* callee_method, ciMethod* caller_method, 1.14 int caller_bci, ciCallProfile& profile, 1.15 @@ -144,6 +149,7 @@ 1.16 // bump the max size if the call is frequent 1.17 if ((freq >= InlineFrequencyRatio) || 1.18 (call_site_count >= InlineFrequencyCount) || 1.19 + is_unboxing_method(callee_method, C) || 1.20 is_init_with_ea(callee_method, caller_method, C)) { 1.21 1.22 max_inline_size = C->freq_inline_size(); 1.23 @@ -237,8 +243,25 @@ 1.24 return false; 1.25 } 1.26 1.27 + if (callee_method->should_not_inline()) { 1.28 + set_msg("disallowed by CompilerOracle"); 1.29 + return true; 1.30 + } 1.31 + 1.32 +#ifndef PRODUCT 1.33 + if (ciReplay::should_not_inline(callee_method)) { 1.34 + set_msg("disallowed by ciReplay"); 1.35 + return true; 1.36 + } 1.37 +#endif 1.38 + 1.39 // Now perform checks which are heuristic 1.40 1.41 + if (is_unboxing_method(callee_method, C)) { 1.42 + // Inline unboxing methods. 1.43 + return false; 1.44 + } 1.45 + 1.46 if (!callee_method->force_inline()) { 1.47 if (callee_method->has_compiled_code() && 1.48 callee_method->instructions_size() > InlineSmallCode) { 1.49 @@ -260,18 +283,6 @@ 1.50 } 1.51 } 1.52 1.53 - if (callee_method->should_not_inline()) { 1.54 - set_msg("disallowed by CompilerOracle"); 1.55 - return true; 1.56 - } 1.57 - 1.58 -#ifndef PRODUCT 1.59 - if (ciReplay::should_not_inline(callee_method)) { 1.60 - set_msg("disallowed by ciReplay"); 1.61 - return true; 1.62 - } 1.63 -#endif 1.64 - 1.65 if (UseStringCache) { 1.66 // Do not inline StringCache::profile() method used only at the beginning. 1.67 if (callee_method->name() == ciSymbol::profile_name() && 1.68 @@ -296,9 +307,8 @@ 1.69 } 1.70 1.71 if (is_init_with_ea(callee_method, caller_method, C)) { 1.72 - 1.73 // Escape Analysis: inline all executed constructors 1.74 - 1.75 + return false; 1.76 } else if (!callee_method->was_executed_more_than(MIN2(MinInliningThreshold, 1.77 CompileThreshold >> 1))) { 1.78 set_msg("executed < MinInliningThreshold times");