8352565: Add native method implementation of Reference.get()#284
8352565: Add native method implementation of Reference.get()#284chmielewskiandreas wants to merge 1 commit intoopenjdk:masterfrom
Conversation
|
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 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 |
|
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! |
|
❗ This change is not yet ready to be integrated. |
|
This backport pull request has now been updated with issue from the original commit. |
|
|
|
/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. |
|
@chmielewskiandreas |
gnu-andrew
left a comment
There was a problem hiding this comment.
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
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
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk25u-dev.git pull/284/head:pull/284$ git checkout pull/284Update a local copy of the PR:
$ git checkout pull/284$ git pull https://git.openjdk.org/jdk25u-dev.git pull/284/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 284View PR using the GUI difftool:
$ git pr show -t 284Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk25u-dev/pull/284.diff
Using Webrev
Link to Webrev Comment