RFR: 8302152: Speed up tests with infinite loops, sleep less [v2]

Tobias Hartmann thartmann at openjdk.org
Mon Feb 13 13:00:29 UTC 2023


On Mon, 13 Feb 2023 12:19:56 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> From over `5 sec` to about `0.8 sec`.
>> 
>> I simply reduced the `Thread.sleep`.
>> 
>> I verified that the same compilations still happen.
>> 
>> ~/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
>> 
>>     283   32 % !   3       compiler.loopopts.TestInfLoopNearUsePlacement::test @ 39 (61 bytes)
>>     284   33 % !   4       compiler.loopopts.TestInfLoopNearUsePlacement::test @ 39 (61 bytes)
>>     286   34   !   4       compiler.loopopts.TestInfLoopNearUsePlacement::test (61 bytes)
>> 
>> 
>> On the time measurement that I got initially reported, this test was flagged as especially long-running, with `17 sec`. There may well be another issue, but I hope this fix already does the trick. We will see this in a while once I get the new data.
>> 
>> **Update**
>> Did the same for 4 more tests. Always ensured that we still have all compilations.
>> 
>> `TestStrangeControl.java` -> reduced from `5sec` to `2sec`. Needs sleep of `1sec` to ensure we still run all compilations as before.
>> 
>> `TestInfiniteLoopNest.java` -> reduced from `5sec` to `1.5sec`.
>> 
>> `TestInfiniteLoopCCP.java` -> reduced from `4.5sec` to `0.8sec`.
>> 
>> `TestCMoveWithDeadPhi.java` -> reduced from `4.3sec` to `0.8sec`.
>> 
>> I decided to keep the sleep time rather a bit higher than strictly required. in most of these cases `100ms` would have been sufficient on my machine already.
>
> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   add 4 other tests with infinite loops

Thanks, looks good. You also need to update the copyright dates.

-------------

Marked as reviewed by thartmann (Reviewer).

PR: https://git.openjdk.org/jdk/pull/12514


More information about the hotspot-compiler-dev mailing list