-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8373210: Move ThreadLocalRandom managed fields to carrier thread #28687
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
Conversation
|
👋 Welcome back alanb! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@AlanBateman 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. |
|
/label remove security |
|
@AlanBateman |
src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java
Outdated
Show resolved
Hide resolved
ExE-Boss
left a comment
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.
@Stable is not needed for non‑array final fields in java.lang, as all final instance fields are trusted for constant folding (except for the write protected I/O stream fields in java.lang.System):
jdk/src/hotspot/share/ci/ciField.cpp
Lines 216 to 225 in 3500150
| static bool trust_final_non_static_fields(ciInstanceKlass* holder) { | |
| if (holder == nullptr) | |
| return false; | |
| // Even if general trusting is disabled, trust system-built closures in these packages. | |
| if (holder->is_in_package("java/lang/invoke") || holder->is_in_package("sun/invoke") || | |
| holder->is_in_package("java/lang/reflect") || holder->is_in_package("jdk/internal/reflect") || | |
| holder->is_in_package("jdk/internal/foreign/layout") || holder->is_in_package("jdk/internal/foreign") || | |
| holder->is_in_package("jdk/internal/vm/vector") || holder->is_in_package("jdk/incubator/vector") || | |
| holder->is_in_package("java/lang")) | |
| return true; |
| } | ||
| } | ||
| private final FieldHolder holder; | ||
| @Stable private final FieldHolder holder; |
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.
| @Stable private final FieldHolder holder; | |
| private final FieldHolder holder; |
We know. This is one of a many different prototypes, maybe I should close this PR as it is not meant to commented/reviewed at this time. |
Work in progress, ignore for now.
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28687/head:pull/28687$ git checkout pull/28687Update a local copy of the PR:
$ git checkout pull/28687$ git pull https://git.openjdk.org/jdk.git pull/28687/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28687View PR using the GUI difftool:
$ git pr show -t 28687Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28687.diff