8390550: C2 hit MemLimit when run with -Xcomp -XX:VerifyIterativeGVN=1110 - #32421
Open
vnkozlov wants to merge 1 commit into
Open
8390550: C2 hit MemLimit when run with -Xcomp -XX:VerifyIterativeGVN=1110#32421vnkozlov wants to merge 1 commit into
vnkozlov wants to merge 1 commit into
Conversation
|
👋 Welcome back kvn! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cause of the issue is that during
SubTypeChecknode expansion control and memory are affected and a lot of temporaryMergeMemnodes created as result. Even if temporary nodes are removed from graph after processing they still hold space in nodes arena and other arenas. The more IGVN optimizations are called the more such temporary nodes are created.In the failed compilation case C2 created about 1M temporary MergeMem nodes (note the method
$Proxy132::<clinit>is big: 5967 byte codes). Which alone requires about 200Mb of memory in arena.This is ironically consequences of JDK-8239072: "subtype check macro node causes node budget to be exhausted" changes which added whole graph IGVN optimization after EACH macro node expansion.
Calling
_igvn.optimize()after elimination ofOpaqueandLoopLimitnodes and before expanding nodes solved the JDK-8239072 issue alone. So calling it after each macro expansion is excessive.The simplest solution is to adjust JDK-8239072 changes to call
_igvn.optimize()inside iteration only when we reach some node count limit or reasonable number of macro nodes expansion happened.Tested: tier1,tier2,tier3,hs-aot-stress
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32421/head:pull/32421$ git checkout pull/32421Update a local copy of the PR:
$ git checkout pull/32421$ git pull https://git.openjdk.org/jdk.git pull/32421/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 32421View PR using the GUI difftool:
$ git pr show -t 32421Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32421.diff
Using Webrev
Link to Webrev Comment