src/share/vm/opto/bytecodeInfo.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/bytecodeInfo.cpp Mon May 6 18:14:15 2013
--- new/src/share/vm/opto/bytecodeInfo.cpp Mon May 6 18:14:15 2013
*** 95,104 ****
--- 95,109 ----
caller_method != C->method() &&
caller_method->holder()->is_subclass_of(callee_method->holder()))
);
}
+ static bool is_unboxing_method(ciMethod* callee_method, Compile* C) {
+ // Force inlining unboxing accessor.
+ return C->eliminate_boxing() && callee_method->is_unboxing_method();
+ }
+
// positive filter: should callee be inlined?
bool InlineTree::should_inline(ciMethod* callee_method, ciMethod* caller_method,
int caller_bci, ciCallProfile& profile,
WarmCallInfo* wci_result) {
// Allows targeted inlining
*** 142,151 ****
--- 147,157 ----
int freq = call_site_count / invoke_count;
// bump the max size if the call is frequent
if ((freq >= InlineFrequencyRatio) ||
(call_site_count >= InlineFrequencyCount) ||
+ is_unboxing_method(callee_method, C) ||
is_init_with_ea(callee_method, caller_method, C)) {
max_inline_size = C->freq_inline_size();
if (size <= max_inline_size && TraceFrequencyInlining) {
CompileTask::print_inline_indent(inline_level());
*** 235,246 ****
--- 241,269 ----
if (callee_method->should_inline()) {
set_msg("force inline by CompilerOracle");
return false;
}
+ if (callee_method->should_not_inline()) {
+ set_msg("disallowed by CompilerOracle");
+ return true;
+ }
+
+ #ifndef PRODUCT
+ if (ciReplay::should_not_inline(callee_method)) {
+ set_msg("disallowed by ciReplay");
+ return true;
+ }
+ #endif
+
// Now perform checks which are heuristic
+ if (is_unboxing_method(callee_method, C)) {
+ // Inline unboxing methods.
+ return false;
+ }
+
if (!callee_method->force_inline()) {
if (callee_method->has_compiled_code() &&
callee_method->instructions_size() > InlineSmallCode) {
set_msg("already compiled into a big method");
return true;
*** 258,279 ****
--- 281,290 ----
set_msg("exception method");
return true;
}
}
if (callee_method->should_not_inline()) {
set_msg("disallowed by CompilerOracle");
return true;
}
#ifndef PRODUCT
if (ciReplay::should_not_inline(callee_method)) {
set_msg("disallowed by ciReplay");
return true;
}
#endif
if (UseStringCache) {
// Do not inline StringCache::profile() method used only at the beginning.
if (callee_method->name() == ciSymbol::profile_name() &&
callee_method->holder()->name() == ciSymbol::java_lang_StringCache()) {
set_msg("profiling method");
*** 294,306 ****
--- 305,316 ----
set_msg("never executed");
return true;
}
if (is_init_with_ea(callee_method, caller_method, C)) {
// Escape Analysis: inline all executed constructors
+ return false;
} else if (!callee_method->was_executed_more_than(MIN2(MinInliningThreshold,
CompileThreshold >> 1))) {
set_msg("executed < MinInliningThreshold times");
return true;
}
src/share/vm/opto/bytecodeInfo.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File