[9] RFR(XS): 8148564: compiler/intrinsics/string/TestStringIntrinsics2.java times out

Tobias Hartmann tobias.hartmann at oracle.com
Thu Feb 11 14:29:01 UTC 2016


Hi,

please review the following patch.

https://bugs.openjdk.java.net/browse/JDK-8148564
http://cr.openjdk.java.net/~thartmann/8148564/webrev.00/

The test times out with a fastdebug build and -Xcomp after 356 seconds. The profile shows that most time is spent in C1:
40.06% java libjvm.so [.] RangeCheckEliminator::Verification::can_reach(BlockBegin*, BlockBegin*, BlockBeg
20.08% java libjvm.so [.] LinearScan::is_sorted(IntervalArray*)
4.47% java libc-2.19.so [.] memset

LinearScan::is_sorted() is known to be very slow (JDK-8067014). It seems that RangeCheckEliminator::Verification::can_reach() also slows down performance significantly.
Without these checks the runtime drops down to 126 seconds.

The accumulated compiler times also show that most time is spent in C1 (see [1]):
C1 Compile Time: 326.983 s
C2 Compile Time: 3.241 s

A product build is significantly faster, i.e. the slowdown is caused by additional C1 verification code in fastdebug builds:
C1 Compile Time: 8.463 s
C2 Compile Time: 1.619 s

The problem is that the test specifies -XX:MaxInlineSize=100 to trigger inlining of intrinsics. With -Xcomp, this also causes many other methods to be inlined, blowing up the graphs and significantly slowing down compilation. Since the test uses the Whitebox API to trigger compilation, -Xcomp is not required.

I verified that -XX:MaxInlineSize=70 is enough to inline all intrinsics and added -Xmixed to the test to avoid compilation of unrelated methods.

Thanks,
Tobias

[1] https://bugs.openjdk.java.net/secure/attachment/57052/CITime.log



More information about the hotspot-compiler-dev mailing list