Skip to content

Conversation

@AlanBateman
Copy link
Contributor

@AlanBateman AlanBateman commented Dec 6, 2025

Work in progress, ignore for now.


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

Issue

  • JDK-8373210: Move ThreadLocalRandom managed fields to carrier thread (Enhancement - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28687

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 6, 2025

👋 Welcome back alanb! 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 Dec 6, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added security security-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Dec 6, 2025
@openjdk
Copy link

openjdk bot commented Dec 6, 2025

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

  • core-libs
  • 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.

@AlanBateman
Copy link
Contributor Author

/label remove security

@openjdk openjdk bot removed the security security-dev@openjdk.org label Dec 6, 2025
@openjdk
Copy link

openjdk bot commented Dec 6, 2025

@AlanBateman
The security label was successfully removed.

Copy link

@ExE-Boss ExE-Boss left a 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):

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;
Copy link

Choose a reason for hiding this comment

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

Suggested change
@Stable private final FieldHolder holder;
private final FieldHolder holder;

@AlanBateman
Copy link
Contributor Author

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

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.

@AlanBateman AlanBateman closed this Dec 8, 2025
@AlanBateman AlanBateman deleted the JDK-8373210 branch December 10, 2025 10:54
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

Development

Successfully merging this pull request may close these issues.

3 participants