Skip to content
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

8274795: AArch64: avoid spilling and restoring r18 in macro assembler #744

Closed

Conversation

lewurm
Copy link
Member

@lewurm lewurm commented Jan 7, 2022

r18 should not be used as it is reserved as platform register. Linux is fine with userspace using it, but Windows and also recently macOS (#301 (comment) ) are actually using it on the kernel side.

The macro assembler uses the bit pattern 0x7fff_ffff (== r0-r30) to specify which registers to spill. While spilling r18 is fine (e.g. for a register dump), we should never restore it.

Tested tier1 on Linux/AArch64 and macOS/AArch64 (the latter on top of the current patches from openjdk/aarch64-port#14 ).


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8274795: AArch64: avoid spilling and restoring r18 in macro assembler

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk11u-dev pull/744/head:pull/744
$ git checkout pull/744

Update a local copy of the PR:
$ git checkout pull/744
$ git pull https://git.openjdk.java.net/jdk11u-dev pull/744/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 744

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk11u-dev/pull/744.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jan 7, 2022

👋 Welcome back burban! 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 openjdk bot changed the title Backport ede3f4e94c752a8457b7c24e001bd122845d2f6a 8274795: AArch64: avoid spilling and restoring r18 in macro assembler Jan 7, 2022
@openjdk
Copy link

@openjdk openjdk bot commented Jan 7, 2022

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport rfr labels Jan 7, 2022
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jan 7, 2022

Webrevs

@openjdk
Copy link

@openjdk openjdk bot commented Jan 7, 2022

@lewurm This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8274795: AArch64: avoid spilling and restoring r18 in macro assembler

Reviewed-by: aph

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

  • 4a5caa0: 8193277: SimpleFileObject inconsistency between getName and getShortName
  • e7b89f7: 8225559: assertion error at TransTypes.visitApply
  • 5ab97c4: 8220634: SymLinkArchiveTest should handle not being able to create symlinks
  • a29949b: 8214026: Canonicalized archive paths appearing in diagnostics
  • 538013a: 8251126: nsk.share.GoldChecker should read golden file from ${test.src}
  • fac0f5a: 8237798: rewrite vmTestbase/jit/tiered from shell to java
  • f5ade3e: 8262134: compiler/uncommontrap/TestDeoptOOM.java failed with "guarantee(false) failed: wrong number of expression stack elements during deopt"
  • 89f4d44: 8210194: [TESTBUG] jvmti_FollowRefObjects.cpp missing initializer for member _jvmtiHeapCallbacks::heap_reference_callback
  • 898b8de: 8277441: CompileQueue::add fails with assert(_last->next() == __null) failed: not last
  • e3da580: 8273704: DrawStringWithInfiniteXform.java failed : drawString with InfiniteXform transform takes long time
  • ... and 36 more: https://git.openjdk.java.net/jdk11u-dev/compare/ec89f1b6c317932e937291f43e68d04ff77204b8...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.

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 (@theRealAph) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready label Jan 7, 2022
@lewurm
Copy link
Member Author

@lewurm lewurm commented Jan 18, 2022

/integrate

@openjdk openjdk bot added the sponsor label Jan 18, 2022
@openjdk
Copy link

@openjdk openjdk bot commented Jan 18, 2022

@lewurm
Your change (at version 1376289) is now ready to be sponsored by a Committer.

@VladimirKempik
Copy link

@VladimirKempik VladimirKempik commented Jan 21, 2022

/sponsor

@openjdk
Copy link

@openjdk openjdk bot commented Jan 21, 2022

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

  • 914d48c: 8232533: G1 uses only a single thread for pretouching the java heap
  • ec03928: 8273933: [TESTBUG] Test must run without preallocated exceptions
  • cba6c04: 8268542: serviceability/logging/TestFullNames.java tests only 1st test case
  • 521144c: 8251998: remove usage of PropertyResolvingWrapper in vmTestbase/jit/t
  • f69e75f: 8273438: Enable parallelism in vmTestbase/metaspace/stressHierarchy tests
  • 574c04c: 8273433: Enable parallelism in vmTestbase_nsk_sysdict tests
  • 5ffd40d: 8273341: Update Siphash to version 1.0
  • 0c4803b: 8278871: [JVMCI] assert((uint)reason < 2* _trap_hist_limit) failed: oob
  • 3352b56: 8275326: C2: assert(no_dead_loop) failed: dead loop detected
  • ad94355: 8251127: clean up FileInstaller $test.src $cwd in remaining vmTestbase_vm_compiler tests
  • ... and 80 more: https://git.openjdk.java.net/jdk11u-dev/compare/ec89f1b6c317932e937291f43e68d04ff77204b8...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated label Jan 21, 2022
@openjdk openjdk bot closed this Jan 21, 2022
@openjdk openjdk bot removed ready rfr sponsor labels Jan 21, 2022
@openjdk
Copy link

@openjdk openjdk bot commented Jan 21, 2022

@VladimirKempik @lewurm Pushed as commit b5cae57.

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

@lewurm
Copy link
Member Author

@lewurm lewurm commented Jan 21, 2022

Thank you Andrew, Goetz and Vladimir!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport integrated
3 participants