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

8318507: G1: Improve remset clearing for humongous candidates #16270

Closed

Conversation

tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Oct 19, 2023

Hi all,

please review this small cleanup that merges two calls to HeapRegionRemSet::clear()/HeapRegionRemSet::set_state_complete() to a single call to clear() with appropriate parameters.

Also remove now obsolete asserts that are done in clear() already; actually the second one is wrong, there may be code roots attached to the region.

Testing: gha, tier1-5 almost done

Thanks,
Thomas


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-8318507: G1: Improve remset clearing for humongous candidates (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16270

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 19, 2023

👋 Welcome back tschatzl! 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 changed the title 8318507 8318507: G1: Improve remset clearing for humongous candidates Oct 19, 2023
@openjdk
Copy link

openjdk bot commented Oct 19, 2023

@tschatzl The following label will be automatically applied to this pull request:

  • hotspot-gc

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-gc hotspot-gc-dev@openjdk.org label Oct 19, 2023
@tschatzl tschatzl marked this pull request as ready for review October 19, 2023 15:35
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 19, 2023
@mlbridge
Copy link

mlbridge bot commented Oct 19, 2023

Webrevs

Copy link
Member

@walulyai walulyai left a comment

Choose a reason for hiding this comment

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

LGTM!

@openjdk
Copy link

openjdk bot commented Oct 19, 2023

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

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

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

8318507: G1: Improve remset clearing for humongous candidates

Reviewed-by: iwalulya, ayang, mli

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

  • 4eab39d: 8318585: Rename CodeCache::UnloadingScope to UnlinkingScope
  • ffadd63: 8317868: Add @sealedGraph to MethodHandleDesc and descendants
  • ecd25e7: 8318484: Initial version of cdsConfig.hpp
  • a876beb: 8316741: BasicStroke.createStrokedShape miter-limits failing on small shapes
  • 4cf195f: 8318573: The nsk.share.jpda.SocketConnection should fail if socket was closed.
  • af2f4bf: 8318622: ProblemList gc/cslocker/TestCSLocker.java on linux-x64 in Xcomp mode
  • a1a62d9: 8306308: (ch) Writer created by Channels::newWriter may lose data
  • 77b2394: 8318482: problemlist compiler/codecache/CheckLargePages.java on Linux-x64 until JDK-8317831 is fixed
  • d3ebb4a: 8317373: Add Telia Root CA v2
  • 66d90d5: 8318107: Un-ProblemList LocaleProvidersRun and CalendarDataRegression
  • ... and 37 more: https://git.openjdk.org/jdk/compare/defc7e0f8d32e2dc62568f34d86d8f77a759e6ce...master

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 Oct 19, 2023
@albertnetymk
Copy link
Member

actually the second one is wrong, there may be code roots attached to the region.

occupancy_less_or_equal_than should have ensured that code-roots is empty. (The method name is not very obvious on that, IMO. Breaking it into two might be better.) I believe one can assert(r->rem_set()->is_complete() && r->rem_set()->is_empty(), "inv"); after clear(...).

@tschatzl
Copy link
Contributor Author

tschatzl commented Oct 23, 2023

actually the second one is wrong, there may be code roots attached to the region.

occupancy_less_or_equal_than should have ensured that code-roots is empty. (The method name is not very obvious on that, IMO. Breaking it into two might be better.) I believe one can assert(r->rem_set()->is_complete() && r->rem_set()->is_empty(), "inv"); after clear(...).

👍
This is similar to @Hamlin-Li 's question.

Copy link

@Hamlin-Li Hamlin-Li left a comment

Choose a reason for hiding this comment

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

LGTM.

@tschatzl
Copy link
Contributor Author

Thanks @Hamlin-Li @albertnetymk @walulyai for your reviews.
/integrate

@openjdk
Copy link

openjdk bot commented Oct 23, 2023

Going to push as commit 729f4c5.
Since your change was applied there have been 47 commits pushed to the master branch:

  • 4eab39d: 8318585: Rename CodeCache::UnloadingScope to UnlinkingScope
  • ffadd63: 8317868: Add @sealedGraph to MethodHandleDesc and descendants
  • ecd25e7: 8318484: Initial version of cdsConfig.hpp
  • a876beb: 8316741: BasicStroke.createStrokedShape miter-limits failing on small shapes
  • 4cf195f: 8318573: The nsk.share.jpda.SocketConnection should fail if socket was closed.
  • af2f4bf: 8318622: ProblemList gc/cslocker/TestCSLocker.java on linux-x64 in Xcomp mode
  • a1a62d9: 8306308: (ch) Writer created by Channels::newWriter may lose data
  • 77b2394: 8318482: problemlist compiler/codecache/CheckLargePages.java on Linux-x64 until JDK-8317831 is fixed
  • d3ebb4a: 8317373: Add Telia Root CA v2
  • 66d90d5: 8318107: Un-ProblemList LocaleProvidersRun and CalendarDataRegression
  • ... and 37 more: https://git.openjdk.org/jdk/compare/defc7e0f8d32e2dc62568f34d86d8f77a759e6ce...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 23, 2023

@tschatzl Pushed as commit 729f4c5.

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

@tschatzl tschatzl deleted the submit/8318507-improve-remset-clearing branch October 23, 2023 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated
4 participants