Skip to content

8352565: Add native method implementation of Reference.get()#284

Open
chmielewskiandreas wants to merge 1 commit intoopenjdk:masterfrom
chmielewskiandreas:backport-8352565
Open

8352565: Add native method implementation of Reference.get()#284
chmielewskiandreas wants to merge 1 commit intoopenjdk:masterfrom
chmielewskiandreas:backport-8352565

Conversation

@chmielewskiandreas
Copy link
Copy Markdown

@chmielewskiandreas chmielewskiandreas commented Feb 18, 2026

Hi, this is a clean backport of 56c75453cd69e80b9411b4e1794c953998406342

Testing:

Verified possible regressions using following tests on my local machine:

make run-test TEST="hotspot_gc"
make run-test TEST="hotspot/jtreg/gc"
make run-test TEST="jdk/java/lang/"
make run-test TEST="hotspot/jtreg/gc/stress"
make run-test TEST="vmTestbase_vm_gc"

The test that is part of the PR is part of tier1 gc run:

https://github.com/chmielewskiandreas/jdk25u-dev/actions/runs/22150746910/job/64044910144#step:10:838

To verify whether the patch works, I ran TestNativeReferenceGet.java (change line -XX:DisableIntrinsic=_Reference_get) from the PR on master, which actually failed ("RuntimeException("Reference enqueued")")


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8352565 needs maintainer approval

Issue

  • JDK-8352565: Add native method implementation of Reference.get() (Enhancement - P4 - Rejected)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk25u-dev.git pull/284/head:pull/284
$ git checkout pull/284

Update a local copy of the PR:
$ git checkout pull/284
$ git pull https://git.openjdk.org/jdk25u-dev.git pull/284/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 284

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk25u-dev/pull/284.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper bridgekeeper bot added the oca Needs verification of OCA signatory status label Feb 18, 2026
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Feb 18, 2026

Hi @chmielewskiandreas, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user chmielewskiandreas" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@chmielewskiandreas
Copy link
Copy Markdown
Author

/covered

@bridgekeeper bridgekeeper bot added the oca-verify Needs verification of OCA signatory status label Feb 18, 2026
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Feb 18, 2026

Thank you! Please allow for a few business days to verify that your employer has signed the OCA. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

@openjdk
Copy link
Copy Markdown

openjdk bot commented Feb 18, 2026

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

@openjdk openjdk bot changed the title Backport 56c75453cd69e80b9411b4e1794c953998406342 8352565: Add native method implementation of Reference.get() Feb 18, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Feb 18, 2026

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required labels Feb 18, 2026
@bridgekeeper bridgekeeper bot removed oca Needs verification of OCA signatory status oca-verify Needs verification of OCA signatory status labels Feb 27, 2026
@chmielewskiandreas chmielewskiandreas marked this pull request as ready for review March 2, 2026 15:26
@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 2, 2026

⚠️ @chmielewskiandreas This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 2, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Mar 2, 2026

Webrevs

@chmielewskiandreas
Copy link
Copy Markdown
Author

/approval request "I am proposing this clean backport. Low/medium risk due to the fact that the introduced native method is only used when Reference.get() isn´t intrinsified. The behavior isn't otherwise altered. The attached test is passing whereas it did not pass without this patch.

@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 3, 2026

@chmielewskiandreas
8352565: The approval request has been created successfully.

@openjdk openjdk bot added approval Requires approval; will be removed when approval is received and removed approval Requires approval; will be removed when approval is received labels Mar 3, 2026
Copy link
Copy Markdown
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

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

Patch and testing looks good.

This is listed as an enhancement but reads more like a bug fix to me. The existing get() method appears like a Java method, but in reality, this is usually being replaced by a native intrinsic. Having a native implementation which may be replaced by an intrinsic makes this clearer in the code. Similar patterns already exist in e.g. AESCrypt.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants