RFR: 8302152: Speed up tests with infinite loops, sleep less [v3]
Emanuel Peter
epeter at openjdk.org
Mon Feb 13 14:40:52 UTC 2023
> 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:
copyright updated
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/12514/files
- new: https://git.openjdk.org/jdk/pull/12514/files/9a904a33..6d76853c
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=12514&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=12514&range=01-02
Stats: 5 lines in 5 files changed: 2 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/12514.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12514/head:pull/12514
PR: https://git.openjdk.org/jdk/pull/12514
More information about the hotspot-compiler-dev
mailing list