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

JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) #10952

Closed
wants to merge 71 commits into from

Conversation

theRealAph
Copy link
Contributor

@theRealAph theRealAph commented Nov 2, 2022

JEP 429 implementation.


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
  • Change requires a CSR request to be approved

Issues

  • JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator)
  • JDK-8286667: Implementation of Scoped values (Incubator) (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10952

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

Using diff file

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

@theRealAph theRealAph changed the title JDK-8286666: Implementation of Scoped Values (Incubator) JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) Nov 2, 2022
@theRealAph theRealAph marked this pull request as draft November 2, 2022 16:24
@bridgekeeper
Copy link

bridgekeeper bot commented Nov 2, 2022

👋 Welcome back aph! 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 added the csr Pull request needs approved CSR before integration label Nov 2, 2022
@openjdk
Copy link

openjdk bot commented Nov 2, 2022

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

  • build
  • core-libs
  • hotspot
  • security

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 security security-dev@openjdk.org hotspot hotspot-dev@openjdk.org build build-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Nov 2, 2022
Comment on lines 1609 to 1610
task.run();
Reference.reachabilityFence(bindings);
Copy link

Choose a reason for hiding this comment

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

This should probably be in a tryfinally block:

Suggested change
task.run();
Reference.reachabilityFence(bindings);
try {
task.run();
} finally {
Reference.reachabilityFence(bindings);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wonder. The pattern I'm using here is based on AccessController.executePrivileged, which doesn't have the finally clause. Perhaps I should add one here anyway.

Copy link
Member

Choose a reason for hiding this comment

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

I hope it doesn't matter. There is an example in the reachabilityFence javadocs where it does not use finally. For it to matter, I think the compiler would need to inline through run() and prove that it can throw an exception, but I don't think that's how the JIT compilers currently implement reachabilityFence. I suppose a finally shouldn't hurt, however.

// Iterate through Java frames
vframeStream vfst(thread);
for(; !vfst.at_end(); vfst.next()) {
int loc = 0;
Copy link
Member

Choose a reason for hiding this comment

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

Use -1 instead (see below)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, thanks.

Copy link
Member

@dean-long dean-long left a comment

Choose a reason for hiding this comment

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

I made a few minor suggestions, but overall the HotSpot changes look good. Nice job Andrew.

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Dec 1, 2022
@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label Dec 2, 2022
@openjdk
Copy link

openjdk bot commented Dec 5, 2022

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

8286666: JEP 429: Implementation of Scoped Values (Incubator)

Reviewed-by: psandoz, dlong, alanb, 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 1 new commit pushed to the master branch:

  • cd2182a: 8295724: VirtualMachineError: Out of space in CodeCache for method handle intrinsic

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 ready Pull request is ready to be integrated and removed merge-conflict Pull request has merge conflict with target branch labels Dec 5, 2022
@openjdk openjdk bot added merge-conflict Pull request has merge conflict with target branch and removed ready Pull request is ready to be integrated labels Dec 6, 2022
@openjdk openjdk bot added ready Pull request is ready to be integrated and removed merge-conflict Pull request has merge conflict with target branch labels Dec 6, 2022
@theRealAph
Copy link
Contributor Author

/integrate delegate

@openjdk openjdk bot added the delegated label Dec 6, 2022
@openjdk
Copy link

openjdk bot commented Dec 6, 2022

@theRealAph Integration of this pull request has been delegated and may be completed by any project committer using the /integrate pull request command.

@AlanBateman
Copy link
Contributor

/integrate

@openjdk
Copy link

openjdk bot commented Dec 7, 2022

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

  • ccc69af: 8296672: Implementation of Virtual Threads (Second Preview)
  • 5a3439d: 4677581: ColorModel.getComponentSize()-wrong conditions for ArrayIndexOutOfBoundsExceptio
  • 27bbe7b: 8297976: Remove sun.net.ProgressMonitor and related classes
  • 085f96c: 8295258: Add BasicType argument to AccessInternal::decorator_fixup
  • 1c2a093: 8298147: Clang warns about pointless comparisons
  • 8ea369a: 8298171: Missing newline in the example output of -Xlog:help
  • acf96c6: 8290432: C2 compilation fails with assert(node->_last_del == _last) failed: must have deleted the edge just produced
  • ce89673: 8297804: (tz) Update Timezone Data to 2022g
  • 62baff5: 8298221: Problem list gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java on macosx-aarch64
  • 16a5901: 8298214: ProblemList java/util/concurrent/forkjoin/AsyncShutdownNow.java
  • ... and 2 more: https://git.openjdk.org/jdk/compare/2cdc0195655317cb0b04f76fd8dce5e40bf52774...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 7, 2022
@openjdk openjdk bot closed this Dec 7, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review delegated labels Dec 7, 2022
@openjdk
Copy link

openjdk bot commented Dec 7, 2022

@AlanBateman Pushed as commit 221e1a4.

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

do_intrinsic(_setScopedValueCache, java_lang_Thread, setScopedValueCache_name, setScopedValueCache_signature, F_SN) \
do_name( setScopedValueCache_name, "setScopedValueCache") \
do_signature(setScopedValueCache_signature, "([Ljava/lang/Object;)V") \
do_intrinsic(_findScopedValueBindings, java_lang_Thread, findScopedValueBindings_name, void_object_signature, F_SN) \
Copy link
Member

Choose a reason for hiding this comment

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

As far as I can tell, there is not yet an intrinsic implementation for findScopedValueBindings. Is this a placeholder for a pending implementation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

9 participants