-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Conversation
👋 Welcome back aph! A progress list of the required criteria for merging this PR into |
@theRealAph The following labels will be automatically applied to this pull request:
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. |
src/jdk.incubator.concurrent/share/classes/jdk/incubator/concurrent/ScopedValue.java
Outdated
Show resolved
Hide resolved
task.run(); | ||
Reference.reachabilityFence(bindings); |
There was a problem hiding this comment.
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 try
‑finally
block:
task.run(); | |
Reference.reachabilityFence(bindings); | |
try { | |
task.run(); | |
} finally { | |
Reference.reachabilityFence(bindings); | |
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
src/jdk.incubator.concurrent/share/classes/jdk/incubator/concurrent/ScopedValue.java
Outdated
Show resolved
Hide resolved
src/java.base/share/classes/jdk/internal/vm/ScopedValueContainer.java
Outdated
Show resolved
Hide resolved
…er.java Co-authored-by: Dean Long <17332032+dean-long@users.noreply.github.com>
src/hotspot/share/prims/jvm.cpp
Outdated
// Iterate through Java frames | ||
vframeStream vfst(thread); | ||
for(; !vfst.at_end(); vfst.next()) { | ||
int loc = 0; |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, thanks.
There was a problem hiding this 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.
@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:
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
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
/integrate delegate |
@theRealAph Integration of this pull request has been delegated and may be completed by any project committer using the /integrate pull request command. |
/integrate |
Going to push as commit 221e1a4.
Your commit was automatically rebased without conflicts. |
@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) \ |
There was a problem hiding this comment.
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?
JEP 429 implementation.
Progress
Issues
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