JDK-8302152 : Speed up tests with infinite loops, sleep less
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,21
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-02-09
  • Updated: 2023-08-07
  • Resolved: 2023-02-15
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 17 JDK 21
17.0.7Fixed 21 b10Fixed
Related Reports
Relates :  
Description
https://github.com/openjdk/jdk/blame/master/test/hotspot/jtreg/compiler/loopopts/TestInfLoopNearUsePlacement.java

Apparently time measurement has shown that this test runs quite long, 17 sec. That would make it one of the slowest compiler tests.

Initial testing shows it only takes 5sec, and it has a sleep statement for 5sec, so that is expected. At least we could reduce the sleep to 1sec, seems it still compiles.

time ~/Documents/jtreg/bin/jtreg -va -s -jdk:/home/emanuel/Documents/fork5-jdk/build/linux-x64-debug/jdk/ -javaoptions:"-XX:CompileCommand=printcompilation,compiler.loopopts.TestInfLoopNearUsePlacement::test" /home/emanuel/Documents/fork5-jdk/open/test/hotspot/jtreg/compiler/loopopts/TestInfLoopNearUsePlacement.java

    287   32 % !   3       compiler.loopopts.TestInfLoopNearUsePlacement::test @ 39 (61 bytes)
    289   33 % !   4       compiler.loopopts.TestInfLoopNearUsePlacement::test @ 39 (61 bytes)
    296   34   !   4       compiler.loopopts.TestInfLoopNearUsePlacement::test (61 bytes)

I wonder where the 17 sec are coming from though? Maybe just fix this, and hope we get more info later?

Do the same analysis for other tests in
test/hotspot/jtreg/compiler/loopopts/
that also have infinite-loop pattern.
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1179 Date: 2023-02-17 03:07:01 +0000
17-02-2023

[Fix request 17u] Clean backport, test speed improvement update, low risk Tests pass
17-02-2023

Changeset: a9a53f41 Author: Emanuel Peter <epeter@openjdk.org> Date: 2023-02-15 07:35:23 +0000 URL: https://git.openjdk.org/jdk/commit/a9a53f417d017c6e92d1f0331359037815bd431e
15-02-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/12514 Date: 2023-02-10 16:39:51 +0000
13-02-2023