JDK-8010222 : 8007439 disabled inlining of cold accessor methods
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-03-18
  • Updated: 2014-01-14
  • Resolved: 2013-03-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 Other
8Fixed hs25Fixed
Related Reports
Relates :  
Description
After 8007439 changes C2 does not inline cold accessors (field read methods) which C2 should always inline:

$ cat Test.java 
public class Test {
    int i;
    int read_field() {
        return i;
    }
    int test(int j) {
        if ((j & 0xfff) == 0)
            return read_field();
        else
            return j;
    }
    static public void main(String[] args) {
        Test t = new Test();
        for (int i = 0; i < 11000; i++)
             t.test(i);
    }
}

% /java/re/jdk/8/promoted/all/b79/binaries/solaris-i586/fastdebug/bin/java -XX:+PrintInlining -XX:+PrintCompilation -XX:CICompilerCount=1 -Xbatch Test

    629    1    b        Test::test (15 bytes)
                            @ 9   Test::read_field (5 bytes)   inline (hot)
% /java/re/jdk/8/promoted/all/b80/binaries/solaris-i586/fastdebug/bin/java -XX:+PrintInlining -XX:+PrintCompilation -XX:CICompilerCount=1 -Xbatch Test
    572    1    b        Test::test (15 bytes)
                            @ 9   Test::read_field (5 bytes)   too cold to inline