JDK-8261989 : compiler/c2/TestUnsignedByteCompare1.java times out with "-XX:TieredStopAtLevel=1"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2021-02-18
  • Updated: 2021-02-22
  • Resolved: 2021-02-22
Related Reports
Duplicate :  
Description
Test compiler/c2/TestUnsignedByteCompare1.java
run 0xFF * 20_000 iteration of some verifications and times out with C1.

The stack shows that test spend a lot of time in pattern matching in String.format(...);



Comments
This test is just too slow with C1 because it can't EA all these string allocations in errorMessage(). Anyways, the test is designed to be run by C2 and JDK-8261225 fixes that.
22-02-2021

BTW, we don't run this config in CI, I found it while testing loom, but an issue exists in the latest jdk-17-11-757.
18-02-2021

The fix in the test might be pretty simple like the following diff. However, it is needed to check if it is expected that C1 compiled String.format(..) works so slow. (Test times out after 10 minutes) diff --git a/test/hotspot/jtreg/compiler/c2/TestUnsignedByteCompare1.java b/test/hotspot/jtreg/compiler/c2/TestUnsignedByteCompare1.java index ef035e89241..b64fef349ed 100644 --- a/test/hotspot/jtreg/compiler/c2/TestUnsignedByteCompare1.java +++ b/test/hotspot/jtreg/compiler/c2/TestUnsignedByteCompare1.java @@ -66,7 +66,7 @@ public class TestUnsignedByteCompare1 { } static String errorMessage(byte b, String type) { - return String.format("%s: val=0x%x mask=0x%x", type, b, mask()); + return type + ": val=0x" + Integer.toHexString(b) + " mask=0x" + Integer.toHexString(mask()); } // Mutable mask as a compile-time constant.
18-02-2021