RFR: 8262465: Very long compilation times and high memory consumption in C2 debug builds [v2]
Nils Eliasson
neliasso at openjdk.java.net
Mon Mar 22 16:49:58 UTC 2021
> I tracked down the cause of the compilation times to a assert guarded block in reg_split.cpp.
>
> The test method that causes this behaviour is a main method with an outer iteration loop, and inner loops that iterates over a value array. The inner loops is filled with about 40 calls to a verify() method but with different tests of rotate. Every call to verify is also accompanied by a string concatenation that expands with indy-string-concat.
>
> The result IR has a huge number of live ranges and the index set are very large.
>
> In reg_split there is some code that validate that any liveout isn't compressible to defidx. For all spills - all liveouts a searched for the def. But the lrgs are not compressed yet - so they will scan a chain of renames. To add insult to injury the indexset is huge. Fortunately this is only in debug builds.
>
> I have posted some compile time numbers and IndexSet statistics in the bug.
>
> I propose to guard the assert code with VerifyRegisterAllocation. This isn't optimal since we don't test with that flag regularly, but I think it might be an ok trade off. Bugs in split would still be caught - but later, and then VerifyRegisterAllocation can be turned on.
Nils Eliasson has updated the pull request incrementally with one additional commit since the last revision:
Updated copyright year
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/3119/files
- new: https://git.openjdk.java.net/jdk/pull/3119/files/00c8928e..9efadc86
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3119&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3119&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/3119.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/3119/head:pull/3119
PR: https://git.openjdk.java.net/jdk/pull/3119
More information about the hotspot-compiler-dev
mailing list