JDK-8258603 : c1 IR::verify is expensive
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 15,16,17,18,19
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-12-17
  • Updated: 2022-01-26
  • Resolved: 2022-01-12
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 19
19 b05Fixed
Related Reports
Blocks :  
Blocks :  
Blocks :  
Relates :  
Description
c1 IR::verify is expensive. It is also run once for every block by BlockMerger. For every block all blocks are traversed - both postorder och preorder, multiple times.

This is a debug-build problem only. But still a problem since a method that we can run in product-builds must be testable in debug-builds.


Comments
Changeset: d70545d7 Author: Ludvig Janiuk <ludvig.j.janiuk@oracle.com> Committer: Vladimir Kozlov <kvn@openjdk.org> Date: 2022-01-12 19:24:52 +0000 URL: https://git.openjdk.java.net/jdk/commit/d70545d71080d534fefd3c9652656549f689f620
12-01-2022

These were the tests in question that were timing out due to IR::verify being slow.
16-12-2021

For reference, these tests are getting timeouts: https://github.com/openjdk/jdk16/pull/44
06-12-2021

Better metric: perf stat -r 10 jdk-debug/bin/java -XX:RepeatCompilation=10 -XX:TieredStopAtLevel=1 -Xcomp -version 1.94569 +- 0.00693 seconds time elapsed ( +- 0.36% ) perf stat -r 10 jdk-debug-no-irverify/bin/java -XX:RepeatCompilation=10 -XX:TieredStopAtLevel=1 -Xcomp -version 1.71413 +- 0.00636 seconds time elapsed ( +- 0.37% )
06-12-2021

So one way I'm finding of measuring the impact of IR::verify is to compile one debug build as usual, another with IR::verify commented out. I then use -XX:RepeatCompilation=10 to make the compilation dominate the total runtime more. stat -r 10 jdk-debug/bin/java -XX:RepeatCompilation=10 -Xcomp -version 9.9305 +- 0.0518 seconds time elapsed ( +- 0.52% ) perf stat -r 10 jdk-debug-no-irverify/bin/java -XX:RepeatCompilation=10 -Xcomp -version 9.8912 +- 0.0486 seconds time elapsed ( +- 0.49% ) It's a rough indicator, but at least something observable.
12-11-2021

ILW = Slow C1 compilation leading to timeouts, edge cases in debug builds, disable compilation of affected method = MMM = P3
18-12-2020