Skip to content
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

8071507: (ref) Clear phantom reference as soft and weak references do #94

Closed
wants to merge 2 commits into from

Conversation

poonamparhar
Copy link
Member

@poonamparhar poonamparhar commented Aug 1, 2022

Backport of 8071507 and 8143847 from jdk8u-ri to jdk8u-dev.

8071507: (ref) Clear phantom reference as soft and weak references do
8143847: Remove REF_CLEANER reference category

With these changes, phantom references are automatically cleared by the garbage collector like soft and weak references.

The changes are clean backport apart from a little manual adjustment for the hunk at line 246 in referenceProcessor.cpp.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (3 reviews required, with at least 3 Reviewers)

Issues

  • JDK-8071507: (ref) Clear phantom reference as soft and weak references do
  • JDK-8143847: Remove REF_CLEANER reference category

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 94

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 1, 2022

👋 Welcome back poonam! 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.

@poonamparhar
Copy link
Member Author

/issue add JDK-8143847

@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 1, 2022
@openjdk
Copy link

openjdk bot commented Aug 1, 2022

@poonamparhar
Adding additional issue to issue list: 8143847: Remove REF_CLEANER reference category.

@mlbridge
Copy link

mlbridge bot commented Aug 1, 2022

Webrevs

Copy link
Member

@irisclark irisclark left a comment

Choose a reason for hiding this comment

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

Spec changes match those expected in JSR 337 MR 4.

Thank you!

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

This is an accurate backport. Thanks @poonamparhar !

@openjdk
Copy link

openjdk bot commented Aug 3, 2022

@poonamparhar This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8071507: (ref) Clear phantom reference as soft and weak references do
8143847: Remove REF_CLEANER reference category

Reviewed-by: iris, dholmes, mchung, andrew

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 6 new commits pushed to the master branch:

  • b52eb70: 8287132: Retire Runtime.runFinalizersOnExit so that it always throws UOE
  • deae94f: 8288865: [aarch64] LDR instructions must use legitimized addresses
  • 39fa6fb: 8290000: Bump macOS GitHub actions to macOS 11
  • 1460bfa: Merge
  • 2dadc2b: 8290832: It is no longer possible to change "user.dir" in the JDK8
  • 244f98e: 8291568: Bump update version of OpenJDK: 8u345

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 3, 2022
Copy link
Member

@mlchung mlchung left a comment

Choose a reason for hiding this comment

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

LGTM

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

Is there a reason for backporting two changes in one PR? I see this was done in 8u42 as well. It makes it harder to review than necessary, notably where the two change the same code in referenceProcessor.cpp.

Also, SKARA does not appear to be picking this up as a backport, as the "Backport " style was not used (https://wiki.openjdk.org/display/SKARA/Backports). Ideally it would refer to the changeset in 8u42, ad6cdea5ae385623afa86251a8278c9c5274f4c1, but it may have to be one of the three original changesets from jdk

In the code itself, three files are missing copyright header changes where they are newer than the current version: referenceProcessor.hpp, referenceProcessor.cpp" and referenceType.hpp`. 8143847 bumps all of these to 2016 and this change should do the same. The other files already have a newer copyright year than in 8143847.

@gnu-andrew
Copy link
Member

/reviewers 3 reviewer

@openjdk
Copy link

openjdk bot commented Aug 5, 2022

@gnu-andrew
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 3 (with at least 3 Reviewers).

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Aug 5, 2022
@poonamparhar poonamparhar changed the title 8071507: (ref) Clear phantom reference as soft and weak references do Backport ad6cdea5ae385623afa86251a8278c9c5274f4c1 Aug 5, 2022
@openjdk openjdk bot changed the title Backport ad6cdea5ae385623afa86251a8278c9c5274f4c1 8071507: (ref) Clear phantom reference as soft and weak references do Aug 5, 2022
@openjdk
Copy link

openjdk bot commented Aug 5, 2022

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

@openjdk openjdk bot added the backport label Aug 5, 2022
@mlchung
Copy link
Member

mlchung commented Aug 5, 2022

Is there a reason for backporting two changes in one PR? I see this was done in 8u42 as well. It makes it harder to review than necessary, notably where the two change the same code in referenceProcessor.cpp.

It could be done in two separate PRs. I agree it would be easier to review if they are two separate PRs. 8143847 mainly removed the cleaner related code. As I was familiar with the code, I didn't ask to do two separate PRs. Will bear that in mind in the future.

@poonamparhar
Copy link
Member Author

poonamparhar commented Aug 5, 2022

Also, SKARA does not appear to be picking this up as a backport, as the "Backport " style was not used (https://wiki.openjdk.org/display/SKARA/Backports). Ideally it would refer to the changeset in 8u42, ad6cdea5ae385623afa86251a8278c9c5274f4c1, but it may have to be one of the three original changesets from jdk

In the code itself, three files are missing copyright header changes where they are newer than the current version: referenceProcessor.hpp, referenceProcessor.cpp" and referenceType.hpp`. 8143847 bumps all of these to 2016 and this change should do the same. The other files already have a newer copyright year than in 8143847.

I have updated the copyright years and also fixed the SAKARA backport part.

@kimbarrett
Copy link
Contributor

Is there a reason for backporting two changes in one PR? I see this was done in 8u42 as well. It makes it harder to review than necessary, notably where the two change the same code in referenceProcessor.cpp.

There was a change before 8071507 in mainline (and backported to jdk8u) that wasn’t in the RI. That change was rendered moot (the changed code was entirely removed) by 8143847. So if we’d separated 8071507 and 8143847 in the RI we would have needed to first apply that other change to the RI (8071507 without that earlier change would have been wrong), only to have it disappear with 8143847.

@gnu-andrew
Copy link
Member

Also, SKARA does not appear to be picking this up as a backport, as the "Backport " style was not used (https://wiki.openjdk.org/display/SKARA/Backports). Ideally it would refer to the changeset in 8u42, ad6cdea5ae385623afa86251a8278c9c5274f4c1, but it may have to be one of the three original changesets from jdk
In the code itself, three files are missing copyright header changes where they are newer than the current version: referenceProcessor.hpp, referenceProcessor.cpp" and referenceType.hpp`. 8143847 bumps all of these to 2016 and this change should do the same. The other files already have a newer copyright year than in 8143847.

I have updated the copyright years and also fixed the SAKARA backport part.

Thanks. Patch looks good and seems SKARA is happier now :-)

@gnu-andrew
Copy link
Member

Is there a reason for backporting two changes in one PR? I see this was done in 8u42 as well. It makes it harder to review than necessary, notably where the two change the same code in referenceProcessor.cpp.

There was a change before 8071507 in mainline (and backported to jdk8u) that wasn’t in the RI. That change was rendered moot (the changed code was entirely removed) by 8143847. So if we’d separated 8071507 and 8143847 in the RI we would have needed to first apply that other change to the RI (8071507 without that earlier change would have been wrong), only to have it disappear with 8143847.

Thanks. Having reviewed the code, that makes sense.

@gnu-andrew
Copy link
Member

I've set jdk8u-fix-yes on the bug so this can be integrated now. Thanks again for the contribution.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 11, 2022
@poonamparhar
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Aug 11, 2022

Going to push as commit 0869fc0.
Since your change was applied there have been 6 commits pushed to the master branch:

  • b52eb70: 8287132: Retire Runtime.runFinalizersOnExit so that it always throws UOE
  • deae94f: 8288865: [aarch64] LDR instructions must use legitimized addresses
  • 39fa6fb: 8290000: Bump macOS GitHub actions to macOS 11
  • 1460bfa: Merge
  • 2dadc2b: 8290832: It is no longer possible to change "user.dir" in the JDK8
  • 244f98e: 8291568: Bump update version of OpenJDK: 8u345

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Aug 11, 2022
@openjdk openjdk bot closed this Aug 11, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Aug 11, 2022
@openjdk
Copy link

openjdk bot commented Aug 11, 2022

@poonamparhar Pushed as commit 0869fc0.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport integrated Pull request has been integrated
6 participants