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 #4

Closed
wants to merge 2 commits into from

Conversation

poonamparhar
Copy link
Member

@poonamparhar poonamparhar commented Apr 19, 2022

These changes backport the following fixes to jdk8u-ri:

  • 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 as soft and weak references.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issues

  • JDK-8071507: (ref) Clear phantom reference as soft and weak references do ⚠️ Issue is not open.
  • JDK-8143847: Remove REF_CLEANER reference category ⚠️ Issue is not open.

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk8u-ri pull/4/head:pull/4
$ git checkout pull/4

Update a local copy of the PR:
$ git checkout pull/4
$ git pull https://git.openjdk.java.net/jdk8u-ri pull/4/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk8u-ri/pull/4.diff

@poonamparhar
Copy link
Member Author

poonamparhar commented Apr 19, 2022

/issue add JDK-8143847

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 19, 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.

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

openjdk bot commented Apr 19, 2022

@poonamparhar The issue 8071931 was not found in the JDK project - make sure you have entered it correctly.
As there were validation problems, no additional issues will be added to the list of solved issues.

@openjdk
Copy link

openjdk bot commented Apr 19, 2022

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

@mlbridge
Copy link

mlbridge bot commented Apr 19, 2022

Webrevs

@mlchung
Copy link
Member

mlchung commented Apr 19, 2022

/csr

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Apr 19, 2022
@openjdk
Copy link

openjdk bot commented Apr 19, 2022

@mlchung has indicated that a compatibility and specification (CSR) request is needed for this pull request.
@poonamparhar please create a CSR request for issue JDK-8071507. This pull request cannot be integrated until the CSR request is approved.

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.

The change looks good to me.

Copy link

@kimbarrett kimbarrett left a comment

Choose a reason for hiding this comment

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

Looks good.

@openjdk
Copy link

openjdk bot commented Apr 20, 2022

@poonamparhar
Adding additional issue to issue list: 8285096: (ref) Clear phantom reference as soft and weak references do.

@poonamparhar
Copy link
Member Author

/issue remove JDK-8285096

@openjdk
Copy link

openjdk bot commented Apr 20, 2022

@poonamparhar
Removing additional issue from issue list: 8285096.

@@ -46,8 +46,7 @@ <h2>Package Specification</h2>
references are for implementing memory-sensitive caches, weak references are
for implementing canonicalizing mappings that do not prevent their keys (or
values) from being reclaimed, and phantom references are for scheduling
pre-mortem cleanup actions in a more flexible way than is possible with the
Java finalization mechanism.
scheduling post-mortem cleanup actions.
Copy link
Member

Choose a reason for hiding this comment

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

Is the word "scheduling" repeated at both the end of unchanged line 48 and the beginning of new line 49?

Copy link
Member

Choose a reason for hiding this comment

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

Good catch! Both Kim and I missed this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks Iris. Removed the duplicate "scheduling".

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.

Update spec looks good.

@poonamparhar
Copy link
Member Author

/issue add JDK-8285096

@openjdk
Copy link

openjdk bot commented Apr 28, 2022

@poonamparhar
Adding additional issue to issue list: 8285096: (ref) Clear phantom reference as soft and weak references do.

@mlchung
Copy link
Member

mlchung commented Apr 28, 2022

/csr unneeded

@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label Apr 28, 2022
@openjdk
Copy link

openjdk bot commented Apr 28, 2022

@mlchung determined that a CSR request is not needed for this pull request.

@poonamparhar
Copy link
Member Author

/issue remove JDK-8285096

@openjdk
Copy link

openjdk bot commented Apr 28, 2022

@poonamparhar
Removing additional issue from issue list: 8285096.

@openjdk
Copy link

openjdk bot commented Apr 28, 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: mchung, kbarrett, iris

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 1 new commit pushed to the master branch:

  • d63ed0a: 8284907: Compact profiles build fails with GNU make 4

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 Apr 28, 2022
@mlchung
Copy link
Member

mlchung commented Apr 28, 2022

JDK-8285096 is the CSR. Looks like it was not recognized that blocked the integration. Taking /csr out seems to help.

@poonamparhar
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Apr 28, 2022

Going to push as commit ad6cdea.
Since your change was applied there has been 1 commit pushed to the master branch:

  • d63ed0a: 8284907: Compact profiles build fails with GNU make 4

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Apr 28, 2022

@poonamparhar Pushed as commit ad6cdea.

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

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.

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