JDK-8075467 : Unify force inline by CompilerOracle message
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-03-18
  • Updated: 2015-09-18
  • Resolved: 2015-09-18
Related Reports
Relates :  
Description
C1 and C2 print different messages for force inlinees:
src/share/vm/opto/bytecodeInfo.cpp:117:    set_msg("force inline by CompilerOracle");
src/share/vm/opto/bytecodeInfo.cpp:226:    set_msg("force inline by CompilerOracle");
src/share/vm/c1/c1_GraphBuilder.cpp:3798:    if (callee->should_inline()) msg = "force inline by CompileOracle";

Need to unify these strings to be able to search for it.
Comments
Fixed in: JDK-8135068
18-09-2015

I'll assign myself since this I am already changing things in all theses files.
20-03-2015

It could be also renamed for dontinline and exlcude commands src/share/vm/c1/c1_GraphBuilder.cpp:3361:const char* GraphBuilder::should_not_inline(ciMethod* callee) const { src/share/vm/c1/c1_GraphBuilder.cpp-3362- if ( callee->should_exclude()) return "excluded by CompilerOracle"; src/share/vm/c1/c1_GraphBuilder.cpp:3363: if ( callee->should_not_inline()) return "disallowed by CompilerOracle"; src/share/vm/c1/c1_GraphBuilder.cpp-3364- if ( callee->dont_inline()) return "don't inline by annotation"; src/share/vm/c1/c1_GraphBuilder.cpp-3365- return NULL; src/share/vm/c1/c1_GraphBuilder.cpp-3366-} src/share/vm/opto/bytecodeInfo.cpp:230: if (callee_method->should_not_inline()) { src/share/vm/opto/bytecodeInfo.cpp-231- set_msg("disallowed by CompilerOracle"); src/share/vm/opto/bytecodeInfo.cpp-232- return true; src/share/vm/opto/bytecodeInfo.cpp-233- }
19-03-2015

I agree. It would be better to have a CompileCommand instead of CompilerOracle.
19-03-2015

Should really be "force inline by CompileCommand" so the message relates to the flag that was used.
19-03-2015

Simple fix: diff -r 057de3a22f92 src/share/vm/c1/c1_GraphBuilder.cpp --- a/src/share/vm/c1/c1_GraphBuilder.cpp Wed Mar 18 21:10:07 2015 +0300 +++ b/src/share/vm/c1/c1_GraphBuilder.cpp Wed Mar 18 21:58:35 2015 +0300 @@ -3795,7 +3795,7 @@ const char* msg = ""; if (callee->force_inline()) msg = "force inline by annotation"; - if (callee->should_inline()) msg = "force inline by CompileOracle"; + if (callee->should_inline()) msg = "force inline by CompilerOracle"; print_inlining(callee, msg); } else { // use heuristic controls on inlining
18-03-2015