RFR: 8262950: Restructure compiler/intrinsics/TestRotate.java for easier compilation [v2]

Aleksey Shipilev shade at openjdk.java.net
Wed Mar 3 21:20:05 UTC 2021


> It seems that after [JDK-8256438](https://bugs.openjdk.java.net/browse/JDK-8256438) this test is very slow. See [JDK-8262465 ](https://bugs.openjdk.java.net/browse/JDK-8262465) for more evidence of this.
> I believe the underlying cause is that `main()` is way too busy with test cases, so this eventually happens:
> 
> $ javac test/hotspot/jtreg/compiler/intrinsics/TestRotate.java
> $ java -XX:-TieredCompilation -XX:CompileThreshold=1000 -Xbatch -XX:+PrintCompilation -cp test/hotspot/jtreg compiler.intrinsics.TestRotate
>  ...
>    6112 112 % !b compiler.intrinsics.TestRotate::main @ 1494 (3008 bytes) COMPILE SKIPPED: out of nodes during split (retry at different tier)
> 
> So, while the test is intended to test rotate intrinsics, I think it never gets there because compilation bails. And this also makes the test slow. This is tier1 test, and so its performance is somewhat important for developer experience.
> 
> This improvement restructures the test to be easier to JIT compile. This drops the test run time from ~4 minutes to ~20 seconds on my desktop. Plus, additional diagnostic flag verifies that compiler does not bail anywhere.
> 
> Attn @theRealELiu.
> 
> Additional testing:
>   - [x] Linux x86_64 fastdebug, affected test
>   - [x] Linux x86_64 release, affected test
>   - [x] Linux aarch64 fastdebug, affected test

Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:

  Drop ITERS to 50K

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2811/files
  - new: https://git.openjdk.java.net/jdk/pull/2811/files/ebd9e387..6c35f9ba

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2811&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2811&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2811.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2811/head:pull/2811

PR: https://git.openjdk.java.net/jdk/pull/2811


More information about the hotspot-compiler-dev mailing list