Skip to content

Conversation

@jatin-bhateja
Copy link
Member

@jatin-bhateja jatin-bhateja commented May 1, 2024

Intel® Advanced Performance Extensions (Intel® APX) adds 16 new 64 bit general purpose register also known as Extended General Purpose Registers in IA-32e 64 bit mode.

Summary of changes introduced along with this patch:-

  1. C2 compiler register allocation support.
  2. Architecture state save restoration while transitioning from C1/C2 JIT compiled code to runtime services.
  3. Support new PUSH2/POP2 instructions along with push-pop acceleration hints (PPX) to optimize register save/restore operation.
  4. Applicable extensions to native interface used by runtime for patching instruction.

We plan to address C1 register support in subsequent patch as there are hard upper bound allocation limits
(currently set to r11) imposed by existing implementation of linear scan algorithm after which it reserves
remaining register for special purpose.

Patch has been regressed over stand alone test points after prioritizing EGPR allocations over existing GPR register by manually modifying the register sequences in relevant allocation class.

We plan to do thorough validation using Intel's SDE during course of time and release incremental patches for bug fixes
found during testing.

Kindly review and share your feedback.

Best Regards,
Jatin


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-8329032: C2 compiler register allocation support for APX EGPRs (Sub-task - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19042

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 1, 2024

👋 Welcome back jbhateja! 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 May 1, 2024

@jatin-bhateja 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:

8329032: C2 compiler register allocation support for APX EGPRs

Reviewed-by: kvn, sviswanathan

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

  • a81e1bf: 8332252: Clean up vmTestbase/vm/share
  • 99e4d77: 8333117: Remove support of remote and manual debuggee launchers
  • 9ef86da: 8334170: bug6492108.java test failed with exception Image comparison failed at (0, 0) for image 4
  • 001d686: 8332587: RISC-V: secondary_super_cache does not scale well
  • 5cad0b4: 8322708: Global HTML attributes are not allowed
  • 6420846: 8334396: RISC-V: verify perf of ReverseBytesI/L
  • c6f3bf4: 8334026: Provide a diagnostic PrintMemoryMapAtExit switch on Linux
  • cabd104: 8334164: The fix for JDK-8322811 should use _filename.is_set() rather than strcmp()
  • d7dad50: 8334544: C2: wrong control assigned in PhaseIdealLoop::clone_assertion_predicate_for_unswitched_loops()
  • ff30240: 8334239: Introduce macro for ubsan method/function exclusions
  • ... and 16 more: https://git.openjdk.org/jdk/compare/6f860f8f6f69369130ed79e71255005b5beed45a...master

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
Copy link

openjdk bot commented May 1, 2024

@jatin-bhateja The following label will be automatically applied to this pull request:

  • hotspot

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

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label May 1, 2024
@openjdk
Copy link

openjdk bot commented May 9, 2024

@jatin-bhateja this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout JDK-8329032
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label May 9, 2024
@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label May 13, 2024
@jatin-bhateja jatin-bhateja marked this pull request as ready for review June 13, 2024 15:13
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 13, 2024
@mlbridge
Copy link

mlbridge bot commented Jun 13, 2024

@jatin-bhateja
Copy link
Member Author

/label add hotspot-compiler-dev

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Jun 13, 2024
@openjdk
Copy link

openjdk bot commented Jun 13, 2024

@jatin-bhateja
The hotspot-compiler label was successfully added.

@vnkozlov
Copy link
Contributor

Looks like there is issue with 32-bit builds. See GHA linux-x86 / build failure.

@vnkozlov
Copy link
Contributor

Some JVMCI tests failed in GHA on all x64 platforms:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000109b66d2c, pid=19199, tid=26883
#
# JRE version: OpenJDK Runtime Environment (24.0) (fastdebug build 24-internal-jatin-bhateja)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 24-internal-jatin-bhateja, mixed mode, sharing, tiered, jvmci, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
# Problematic frame:
# V  [libjvm.dylib+0x117ed2c]  StackValue* StackValue::create_stack_value<RegisterMap>(ScopeValue*, unsigned char*, RegisterMap const*)+0x27c

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

I have comments.

@vnkozlov
Copy link
Contributor

Looks good.
I pushed #19758 changes to remove unused code in nativeInst_x86.*
@jatin-bhateja, please merge latest mainline to include the changes. I will start testing after that.

@jatin-bhateja
Copy link
Member Author

Looks good. I pushed #19758 changes to remove unused code in nativeInst_x86.* @jatin-bhateja, please merge latest mainline to include the changes. I will start testing after that.

Hi @vnkozlov , Please submit it for testing.

@vnkozlov
Copy link
Contributor

vnkozlov commented Jun 18, 2024

I start testing

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

My testing passed.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 18, 2024
Copy link

@sviswa7 sviswa7 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 to me.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Update is fine. Let me re-test it before you integrate (because of new asserts).

@jatin-bhateja
Copy link
Member Author

jatin-bhateja commented Jun 20, 2024

Thanks @vnkozlov and @sviswa7 for approvals.

@jatin-bhateja
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 20, 2024

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

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jun 20, 2024

@jatin-bhateja Pushed as commit e5de26d.

💡 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

hotspot hotspot-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.

3 participants