Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

8269246: Scoped ByteBuffer vector access #129

Closed

Conversation

PaulSandoz
Copy link
Member

@PaulSandoz PaulSandoz commented Jun 23, 2021

The Foreign Memory API supports viewing a MemorySegment as a ByteBuffer, an instance of which can then be passed to the vector load/store access methods.

Such ByteBuffer access requires accesses are scoped (a method annotated with ScopedMemoryAccess.Scoped) and the ByteBuffer's scope (instance of ScopedMemoryAccess.Scope) checked for validity. Thereby ensuring exceptional failure if the underlying segment is shared and is closed.

All Vector tests pass on linux-x64, linux-aarch64, macosx-x64, and windows-x64.


Progress

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

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk17 pull/129/head:pull/129
$ git checkout pull/129

Update a local copy of the PR:
$ git checkout pull/129
$ git pull https://git.openjdk.java.net/jdk17 pull/129/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 129

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk17/pull/129.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 23, 2021

👋 Welcome back psandoz! 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 23, 2021

@PaulSandoz The following label will be automatically applied to this pull request:

  • core-libs

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 core-libs core-libs-dev@openjdk.java.net label Jun 23, 2021
@PaulSandoz PaulSandoz changed the title Jdk 8269246 scoped buffer access 8269246: scoped buffer access Jun 23, 2021
@PaulSandoz
Copy link
Member Author

/issue JDK-8269246

@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 23, 2021
@openjdk openjdk bot changed the title 8269246: scoped buffer access 8269246: Scoped ByteBuffer vector access Jun 23, 2021
@openjdk
Copy link

openjdk bot commented Jun 23, 2021

@PaulSandoz This issue is referenced in the PR title - it will now be updated.

@mlbridge
Copy link

mlbridge bot commented Jun 23, 2021

Webrevs

Copy link
Contributor

@mcimadamore mcimadamore left a comment

Choose a reason for hiding this comment

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

Changes look good - thanks for taking the time to centralize the various vector operations inside ScopedMemoryAccess.

@openjdk
Copy link

openjdk bot commented Jun 23, 2021

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

8269246: Scoped ByteBuffer vector access

Reviewed-by: mcimadamore

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

  • b474314: 8266854: LibraryCallKit::inline_preconditions_checkIndex modifies control flow even if the intrinsic bailed out
  • 7e96318: 8254571: Erroneous generic type inference in a lambda expression with a checked exception
  • 1b2147a: 8269125: Klass enqueue element size calculation wrong when traceid value cross compress limit
  • bf70620: 8268961: Parenthesized pattern with guards does not work
  • 8128ca1: 8269066: assert(ZAddress::is_marked(addr)) failed: Should be marked
  • 1323be5: 8269064: Dropped messages of AsyncLogWriter cause memleak
  • ce917b2: 8269148: Update minor GCC version in GitHub Actions pipeline
  • ab7ff1e: 8266885: [aarch64] Crash with 'Field too big for insn' for some tests under compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/

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 ready Pull request is ready to be integrated label Jun 23, 2021
@PaulSandoz
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 24, 2021

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

  • 3fb28d3: 8269218: GaloisCounterMode.overlapDetection misses the JDK-8263436 fix again
  • d3d3b22: 8269265: ProblemList serviceability/sa/TestJmapCoreMetaspace.java with ZGC
  • 0c3fc27: 8268482: compiler/intrinsics/VectorizedMismatchTest.java failed with failed: length in range
  • a30141d: 8269179: Crash in TestMacroLogicVector::testSubWordBoolean: assert(_base >= VectorMask && _base <= VectorZ) failed: Not a Vector
  • b474314: 8266854: LibraryCallKit::inline_preconditions_checkIndex modifies control flow even if the intrinsic bailed out
  • 7e96318: 8254571: Erroneous generic type inference in a lambda expression with a checked exception
  • 1b2147a: 8269125: Klass enqueue element size calculation wrong when traceid value cross compress limit
  • bf70620: 8268961: Parenthesized pattern with guards does not work
  • 8128ca1: 8269066: assert(ZAddress::is_marked(addr)) failed: Should be marked
  • 1323be5: 8269064: Dropped messages of AsyncLogWriter cause memleak
  • ... and 2 more: https://git.openjdk.java.net/jdk17/compare/35e4c2720df64ea6cb68ba8fb62aeeb0562c2907...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jun 24, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 24, 2021
@openjdk
Copy link

openjdk bot commented Jun 24, 2021

@PaulSandoz Pushed as commit 63bcd33.

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core-libs core-libs-dev@openjdk.java.net integrated Pull request has been integrated
2 participants