United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-8005439 no message about inline method if it specifed by CompileCommand
JDK-8005439 : no message about inline method if it specifed by CompileCommand

Details
Type:
Bug
Submit Date:
2012-12-22
Status:
Resolved
Updated Date:
2013-05-01
Project Name:
JDK
Resolved Date:
2013-02-01
Component:
hotspot
OS:
Sub-Component:
compiler
CPU:
Priority:
P4
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:
hs25 (b18)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
print_linling is not called if method specifed by '-XX:CompileCommand=inline'
so it's difficult to understand that the command works or does not work.

also it would be nice to have a flag in output that indicates that method has been successfully/unsuccessfully inlined.
                                    

Comments
output that illustrates problem:
$ java -server -Xcomp -XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining -version 2> /dev/null | grep length
                              @ 8   java.lang.String::length (6 bytes)
                              @ 8   java.lang.String::length (6 bytes)   inline (hot)
                                @ 1   java.lang.String::length (6 bytes)
                              @ 1   java.lang.String::length (6 bytes)
                              @ 1   java.lang.String::length (6 bytes)   inline (hot)
                              @ 12   java.lang.String::length (6 bytes)
                              @ 12   java.lang.String::length (6 bytes)   inline (hot)
                                @ 4   java.lang.String::length (6 bytes)
                              @ 257   java.nio.charset.CoderResult::length (20 bytes)
                              @ 257   java.nio.charset.CoderResult::length (20 bytes)   failed initial checks
                                  @ 4   java.lang.String::length (6 bytes)
                              @ 4   java.lang.String::length (6 bytes)
                                @ 4   java.lang.String::length (6 bytes)

$ java -server -Xcomp -XX:CompileCommand='inline *::length' -XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining -version 2> /dev/null | grep length
CompilerOracle: inline *.length
                              @ 8   java.lang.String::length (6 bytes)   inline (hot)
                              @ 1   java.lang.String::length (6 bytes)   inline (hot)
                              @ 12   java.lang.String::length (6 bytes)   inline (hot)
                              @ 257   java.nio.charset.CoderResult::length (20 bytes)   failed initial checks
                                     
2012-12-22
c1_GraphBuilder.diff adds priniting of inlining these methods with 'force inline by CompilerOracle'
                                     
2012-12-22
Igor, your patch looks good, but it covers only inlining logic in C1 (hint: use -server -XX:-TieredCompilation to ensure you are running C2). Can you check that C2 shouldn't be fixed as well? 

src/share/vm/opto/bytecodeInfo.cpp:
    99   // Allows targeted inlining
   100   if(callee_method->should_inline()) {
...
   212   if (callee_method->force_inline() || callee_method->should_inline()) {
   213     // ignore heuristic controls on inlining
   214     return NULL;
   215   }

After that I'll sponsor your change.
                                     
2012-12-22
URL:   http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/60bba1398c51
User:  vlivanov
Date:  2013-02-01 16:20:11 +0000

                                     
2013-02-01
URL:   http://hg.openjdk.java.net/hsx/hsx25/hotspot/rev/60bba1398c51
User:  amurillo
Date:  2013-02-08 19:17:42 +0000

                                     
2013-02-08



Hardware and Software, Engineered to Work Together