JDK-8148564 : compiler/intrinsics/string/TestStringIntrinsics2.java times out
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-01-29
  • Updated: 2017-08-14
  • Resolved: 2016-02-12
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 9
9 b108Fixed
Related Reports
Relates :  
Relates :  
Description
Warming up static int TestStringIntrinsics2.indexOf_no_match_unknown_needle(java.lang.String,java.lang.String) 1 time(s) 
Warming up static int TestStringIntrinsics2.indexOf_no_match_imm_needle(java.lang.String) 1 time(s) 
Warming up static int TestStringIntrinsics2.indexOf_no_match_imm2_needle(java.lang.String) 1 time(s) 
Warming up static int TestStringIntrinsics2.indexOf_no_match_imm1_needle(java.lang.String) 1 time(s) 
Warming up static java.lang.String TestStringIntrinsics2.indexOf_reads_past_string_unknown_needle(java.lang.String,java.lang.String) 1 time(s) 
Warming up static java.lang.String TestStringIntrinsics2.indexOf_reads_past_string_imm_needle(java.lang.String) 1 time(s) 
Timeout signalled after 1,920 seconds
Warming up static java.lang.String TestStringIntrinsics2.indexOf_reads_past_string_imm2_needle(java.lang.String) 1 time(s) 
Warming up static java.lang.String TestStringIntrinsics2.indexOf_reads_past_string_imm1_needle(java.lang.String) 1 time(s) 
Warming up static int TestStringIntrinsics2.indexOf_match_at_end_of_string_unknown_needle(java.lang.String,java.lang.String) 1 time(s) 
Warming up static int TestStringIntrinsics2.indexOf_match_at_end_of_string_imm_needle(java.lang.String) 1 time(s) 
Warming up static int TestStringIntrinsics2.indexOf_match_at_end_of_string_imm2_needle(java.lang.String) 1 time(s) 
Warming up static int TestStringIntrinsics2.indexOf_match_at_end_of_string_imm1_needle(java.lang.String) 1 time(s) 
Warming up static java.lang.String TestStringIntrinsics2.indexOf_match_spans_end_of_string_unknown_needle(java.lang.String,java.lang.String) 1 time(s) 
Warming up static java.lang.String TestStringIntrinsics2.indexOf_match_spans_end_of_string_imm_needle(java.lang.String) 1 time(s) 
Warming up static java.lang.String TestStringIntrinsics2.indexOf_match_spans_end_of_string_imm2_needle(java.lang.String) 1 time(s) 
Warming up static int TestStringIntrinsics2.indexOf_imm1_needle(java.lang.String) 1 time(s) 
Warming up public static int TestStringIntrinsics2.asmStringCompareTo(java.lang.String,java.lang.String) 1 time(s) 
Warming up public static boolean TestStringIntrinsics2.asmStringEquals(java.lang.String,java.lang.String) 1 time(s) 
Warming up public static boolean TestStringIntrinsics2.asmStringEqualsConst() 1 time(s) 
static int TestStringIntrinsics2.indexOf_no_match_unknown_needle(java.lang.String,java.lang.String) compiled at 4
static int TestStringIntrinsics2.indexOf_no_match_imm_needle(java.lang.String) compiled at 4
static int TestStringIntrinsics2.indexOf_no_match_imm2_needle(java.lang.String) compiled at 4
static int TestStringIntrinsics2.indexOf_no_match_imm1_needle(java.lang.String) compiled at 4
static java.lang.String TestStringIntrinsics2.indexOf_reads_past_string_unknown_needle(java.lang.String,java.lang.String) compiled at 4
static java.lang.String TestStringIntrinsics2.indexOf_reads_past_string_imm_needle(java.lang.String) compiled at 4
static java.lang.String TestStringIntrinsics2.indexOf_reads_past_string_imm2_needle(java.lang.String) compiled at 4
static java.lang.String TestStringIntrinsics2.indexOf_reads_past_string_imm1_needle(java.lang.String) compiled at 4
static int TestStringIntrinsics2.indexOf_match_at_end_of_string_unknown_needle(java.lang.String,java.lang.String) compiled at 4
static int TestStringIntrinsics2.indexOf_match_at_end_of_string_imm_needle(java.lang.String) compiled at 4
static int TestStringIntrinsics2.indexOf_match_at_end_of_string_imm2_needle(java.lang.String) compiled at 4
static int TestStringIntrinsics2.indexOf_match_at_end_of_string_imm1_needle(java.lang.String) compiled at 4
static java.lang.String TestStringIntrinsics2.indexOf_match_spans_end_of_string_unknown_needle(java.lang.String,java.lang.String) compiled at 4
static java.lang.String TestStringIntrinsics2.indexOf_match_spans_end_of_string_imm_needle(java.lang.String) compiled at 4
static java.lang.String TestStringIntrinsics2.indexOf_match_spans_end_of_string_imm2_needle(java.lang.String) compiled at 4
static int TestStringIntrinsics2.indexOf_imm1_needle(java.lang.String) compiled at 4
public static int TestStringIntrinsics2.asmStringCompareTo(java.lang.String,java.lang.String) compiled at 4
public static boolean TestStringIntrinsics2.asmStringEquals(java.lang.String,java.lang.String) compiled at 4
public static boolean TestStringIntrinsics2.asmStringEqualsConst() compiled at 4
Executing public static void TestStringIntrinsics2.test_indexOf_no_match() - OK
Executing public static void TestStringIntrinsics2.test_indexOf_reads_past_string() - OK
Executing public static void TestStringIntrinsics2.test_indexOf_match_at_end_of_string() - OK


options used
 -d64 -Xcomp -server -d64 -XX:MaxRAMFraction=8 -XX:+CreateCoredumpOnCrash -ea -esa -XX:+TieredCompilation -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -XX:+IgnoreUnrecognizedVMOptions -XX:+AggressiveOpts -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -Djava.library.path=/export/home/aurora/CommonData/JTREG_NATIVEPATH/hotspot/jtreg/native -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:MaxInlineSize=100 -XX:MinInliningThreshold=0
Comments
http://cr.openjdk.java.net/~thartmann/8148564/webrev.00/
11-02-2016

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.
11-02-2016

With -Xcomp and a fastdebug build the test times out after 356 seconds on my machine. Here are the runtimes with different flags: No flags: -> 1.5 s -Xcomp: -> 356 s -XX:-TieredCompilation -Xcomp: -> 25 s 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 3.76% java libjvm.so [.] LinearScan::verify_intervals() 3.53% java libjvm.so [.] PredecessorValidator::block_do(BlockBegin*) 2.54% java libjvm.so [.] BlockBegin::iterate_postorder(boolArray&, BlockClosure*) 2.29% java libjvm.so [.] Range::intersects_at(Range*) const 1.89% java libjvm.so [.] VerifyBlockBeginField::block_do(BlockBegin*) 1.69% java libjvm.so [.] PredecessorValidator::PredecessorValidator(IR*) 1.22% java libjvm.so [.] CodeBuffer::block_comment(long, char const*) 0.95% java libjvm.so [.] resource_allocate_bytes(unsigned long, AllocFailStrategy::AllocFailEnum) 0.82% java libjvm.so [.] ValueStack::verify() 0.73% java libjvm.so [.] static_call_Relocation::static_stub() 0.70% java libjvm.so [.] BlockBegin::iterate_preorder(boolArray&, BlockClosure*) 0.59% java ld-2.19.so [.] __tls_get_addr 0.54% java libjvm.so [.] RelocIterator::advance_over_prefix() 0.53% java libjvm.so [.] ResourceObj::get_allocation_type() const 0.51% java libc-2.19.so [.] qsort_r LinearScan::is_sorted is known to be slow (JDK-8067014). Seems like RangeCheckEliminator::Verification::can_reach() also slows down performance significantly. Without these checks the runtime drops down to 126s but probably still hits the timeout on slow systems. The accumulated compiler times also show that most time is spent in C1 (see CITime.log): 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 test checks C2 intrinsics so I would suggest to run it with -XX:-TieredCompilation.
11-02-2016