-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8360557: CTW: Inline cold methods to reach more code #26068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back shade! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
Webrevs
|
We are on par for CTW testing time, comparing to the state a week back:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be tested by us to make sure we clean up all issues this change find.
Sure thing. There is a chicken-and-egg kind of problem that some bugs reproduce only with this PR, and maybe with extra inline tuning :) I am following up on failures that we are seeing. |
I submitted some testing to make sure that CTW is clean in our CI. |
Co-authored-by: Tobias Hartmann <tobias.hartmann@oracle.com>
I see the following crashes that would need to be fixed before this is integrated:
|
We use CTW testing for making sure compilers behave well. But we compile the code that is not executed at all, and since our inlining heuristics often looks back at profiles, we end up not actually inlining all too much! This means CTW testing likely misses lots of bugs that normal code is exposed to, especially e.g. in loop optimizations.
There is an intrinsic tradeoff with accepting more inilned methods in CTW: the compilation time gets significantly worse. With just accepting the cold methods we have reasonable CTW times, eating the improvements we have committed in mainline recently. And it still finds bugs. See the RFE for sample data.
After this lands and CTW starts to compile cold methods, one can greatly expand the scope of the CTW testing by overriding the static inlining limits. Doing e.g.
TEST_VM_OPTS="-XX:MaxInlineSize=70 -XX:C1MaxInlineSize=70"
finds even more bugs. Unfortunately, the compilation times suffer so much, they are impractical to run in standard configurations, see data in RFE. We will enable some of that testing in special testing pipelines.Pre-empting the question: "Well, why not use -Xcomp then, and make sure it inlines well?" The answer is in RFE as well: Xcomp causes a lot of stray compilations for JDK and CTW infra itself. For small JARs in large corpus this eats precious testing time that we would instead like to spend on deeper inlining in the actual JAR code. This also does not force us to look into how CTW works in Xcomp at all; I expect some surprises there. Feather-touching the inlining heuristic paths to just accept methods without looking at profiles looks better.
Tobias had an idea to implement the stress randomized inlining that would expand the scope of inlining. This improvement stacks well with it. This improvement provides the base case of inlining most reasonable methods, and then allow stress infra to inline some more on top of that.
Additional testing:
applications/ctw/modules
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26068/head:pull/26068
$ git checkout pull/26068
Update a local copy of the PR:
$ git checkout pull/26068
$ git pull https://git.openjdk.org/jdk.git pull/26068/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26068
View PR using the GUI difftool:
$ git pr show -t 26068
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26068.diff
Using Webrev
Link to Webrev Comment