Skip to content

Conversation

@dougxc
Copy link
Member

@dougxc dougxc commented Jun 21, 2024

This PR fixes a bug introduced by JDK-8329032 which added the APX registers to AMD64.java.
It broke this invariant:

    /**
     * List of all available registers on this architecture. The index of each register in this list
     * is equal to its {@linkplain Register#number number}.
     */
    private final RegisterArray registers;

That invariant is relied upon by the Graal register allocator.
This PR now tests the invariant and fixes the definitions in AMD64.java that were violating it.

This fix was developed by @tkrodriguez.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8334706: [JVMCI] APX registers incorrectly exposed on AMD64 (Bug - P2)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19824/head:pull/19824
$ git checkout pull/19824

Update a local copy of the PR:
$ git checkout pull/19824
$ git pull https://git.openjdk.org/jdk.git pull/19824/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19824

View PR using the GUI difftool:
$ git pr show -t 19824

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19824.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 21, 2024

👋 Welcome back dnsimon! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jun 21, 2024

@dougxc 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:

8334706: [JVMCI] APX registers incorrectly exposed on AMD64

Reviewed-by: yzheng, never

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 2 new commits pushed to the master branch:

  • 08ace27: 8332314: Add window size configuration option to JavaShellToolBuilder interface
  • 711e723: 6967482: TAB-key does not work in JTables after selecting details-view in JFileChooser

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 21, 2024
@openjdk
Copy link

openjdk bot commented Jun 21, 2024

@dougxc The following labels will be automatically applied to this pull request:

  • graal
  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added graal graal-dev@openjdk.org hotspot-compiler hotspot-compiler-dev@openjdk.org labels Jun 21, 2024
@mlbridge
Copy link

mlbridge bot commented Jun 21, 2024

Webrevs

@eme64
Copy link
Contributor

eme64 commented Jun 21, 2024

@jatin-bhateja authored the changes in #19042 that causes your issues, and @vnkozlov reviewed it. Maybe they can have a look at this?

r8, r9, r10, r11, r12, r13, r14, r15,
r16, r17, r18, r19, r20, r21, r22, r23,
r24, r25, r26, r27, r28, r29, r30, r31
r8, r9, r10, r11, r12, r13, r14, r15
Copy link
Member

@jatin-bhateja jatin-bhateja Jun 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @dougxc , Thanks for fixing this, a comment over cpuRegisters definition relating to its usage will be helpful.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a brief comment. I will leave it for JDK-8334717 to expand upon this.

@dougxc
Copy link
Member Author

dougxc commented Jun 21, 2024

Thanks for the review.

/integrate

@openjdk
Copy link

openjdk bot commented Jun 21, 2024

@dougxc This pull request has not yet been marked as ready for integration.

Copy link
Contributor

@tkrodriguez tkrodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. We should clean AMD64.java up a bit in a follow on PR. It should be more obvious how to make these kinds of changes without touching a bunch of arrays.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 21, 2024
@dougxc
Copy link
Member Author

dougxc commented Jun 21, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Jun 21, 2024

Going to push as commit dbf5a9a.
Since your change was applied there have been 2 commits pushed to the master branch:

  • 08ace27: 8332314: Add window size configuration option to JavaShellToolBuilder interface
  • 711e723: 6967482: TAB-key does not work in JTables after selecting details-view in JFileChooser

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 21, 2024
@openjdk openjdk bot closed this Jun 21, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 21, 2024
@openjdk
Copy link

openjdk bot commented Jun 21, 2024

@dougxc Pushed as commit dbf5a9a.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

graal graal-dev@openjdk.org hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

5 participants