-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8357689: Refactor JVMCI to enable replay compilation in Graal #25433
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
Conversation
|
👋 Welcome back pecimuth! A progress list of the required criteria for merging this PR into |
|
@pecimuth This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 35 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@dougxc) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
| * | ||
| * @return a copy of the slot kinds array | ||
| */ | ||
| public JavaKind[] getSlotKinds() { |
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.
Keep in mind that slotKinds is being converted to a List. In that context, can we return the list without making a copy? Or is the caller expected to be able to mutate the return value?
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.
Applied the changes provided by @mur47x111.
| if (o == this) { | ||
| return true; | ||
| } | ||
| if (o instanceof VirtualObject) { |
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.
Rename l to that and use pattern instanceof:
| if (o instanceof VirtualObject) { | |
| if (o instanceof VirtualObject that) { |
| * @return a copy of the array containing the Java kinds of the values or {@code null} if the | ||
| * values have not been initialized. | ||
| */ | ||
| public JavaKind[] getSlotKinds() { |
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.
Same comments as for BytecodeFrame.getSlotKinds. This applies to all other non-primitive array return values added by this PR.
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.
I left Object[] as the return value of EncodedSpeculationReason#getReason since the array could contain null elements, preventing the use of an immutable list like everywhere else.
Edit: SharedSecrets.getJavaUtilCollectionAccess().listFromTrustedArrayNullsAllowed could work here.
| /** | ||
| * Returns a copy of the array of {@link ResolvedJavaMethod} objects representing the methods | ||
| * whose bytecodes were used as input to the compilation. If the compilation did not record | ||
| * method dependencies, this method returns {@code null}. Otherwise, the first element of the |
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.
null -> empty list?
Webrevs
|
| this.duringCall = duringCall; | ||
| this.values = values; | ||
| this.slotKinds = slotKinds; | ||
| this.slotKinds = listFromTrustedArray(slotKinds); |
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.
ImmutableCollections#listFromTrustedArray asserts that the array class is Object[].class, but the type of slotKinds is JavaKind[] - so these refactorings do not work.
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.
Looks good.
|
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.
Still good.
|
/integrate |
|
/sponsor |
|
Going to push as commit 963b83f.
Your commit was automatically rebased without conflicts. |
This PR introduces a few minor JVMCI refactorings to make replay compilation possible in the Graal compiler.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25433/head:pull/25433$ git checkout pull/25433Update a local copy of the PR:
$ git checkout pull/25433$ git pull https://git.openjdk.org/jdk.git pull/25433/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25433View PR using the GUI difftool:
$ git pr show -t 25433Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25433.diff
Using Webrev
Link to Webrev Comment