Skip to content

8303244: G1: call CardTable::clear_MemRegion directly #12764

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

Closed
wants to merge 1 commit into from

Conversation

albertnetymk
Copy link
Member

@albertnetymk albertnetymk commented Feb 27, 2023

Simple refactoring to skip a guard in card-table clearing.

Test: hotspot_gc


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-8303244: G1: call CardTable::clear_MemRegion directly

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 12764

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 27, 2023

👋 Welcome back ayang! 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 8303244 8303244: G1: call CardTable::clear_MemRegion directly Feb 27, 2023
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 27, 2023
@openjdk
Copy link

openjdk bot commented Feb 27, 2023

@albertnetymk 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 Feb 27, 2023
@mlbridge
Copy link

mlbridge bot commented Feb 27, 2023

Webrevs

@openjdk
Copy link

openjdk bot commented Feb 27, 2023

@albertnetymk 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:

8303244: G1: call CardTable::clear_MemRegion directly

Reviewed-by: ysr, kbarrett

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

  • 5b2e2e4: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)
  • cd4b88d: 8292269: Replace FileMapInfo::fail_continue() with Unified Logging
  • ae29054: 8303175: (fs) Deprecate com.sun.nio.file.SensitivityWatchEventModifier for removal
  • a04b104: 8303413: (fs) Ignore polling interval sensitivity modifiers in PollingWatchService
  • 9944314: 8303587: Remove VMOutOfMemoryError001 test from the problem list after 8303198
  • a50dc67: 8303527: update for deprecated sprintf for jdk.hotspot.agent
  • 40c5edf: 8303181: Memory leak in ClassLoaderExt::setup_app_search_path
  • 29ee7c3: 8303523: Cleanup problem listing of nsk/jvmti/AttachOnDemand/attach002a/TestDescription.java
  • e3016c1: 8303472: Display name for region TR
  • ae797c6: 8301117: Remove old_size param from ResizeableResourceHashtable::resize()
  • ... and 81 more: https://git.openjdk.org/jdk/compare/a43931b79cb25d218e8f9b4d4f3a106f59cb2d37...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 Feb 27, 2023
@kimbarrett
Copy link

I think the code changes are okay.

But while looking at it I wondered what the difference between CT::clear and
CT::clear_MemRegion might be. The former has no description. The latter has a
description that seems wrong.

I also wonder why dirty_MemRegion uses an explicit loop over the cards while
clear_MemRegion uses memset. It seems like that difference has been there
since before the mercurial age.

@albertnetymk
Copy link
Member Author

what the difference between CT::clear and CT::clear_MemRegion might be.

The former guards against memregions not covered by _covered. (Maybe or maybe not really needed for Serial/Parallel; will take a look after this PR.)

dirty_MemRegion vs clear_MemRegion

Maybe there's no need for such discrepancy. Can be fixed in another PR.

@kimbarrett
Copy link

what the difference between CT::clear and CT::clear_MemRegion might be.

The former guards against memregions not covered by _covered. (Maybe or maybe not really needed for Serial/Parallel; will take a look after this PR.)

Right, but that's not what the description comments for the xxx_MemRegion functions say.

dirty_MemRegion vs clear_MemRegion

Maybe there's no need for such discrepancy. Can be fixed in another PR.

That would be fine.

@albertnetymk
Copy link
Member Author

(not all of which must be covered.) for clear_MemRegion is inaccurate. I will fix that in another PR.

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.

@albertnetymk
Copy link
Member Author

Thanks for the review.

/integrate

@openjdk
Copy link

openjdk bot commented Mar 6, 2023

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

  • 5753ab5: 8297454: javax/swing/JComponent/7154030/bug7154030.java failed with "Exception: Failed to show opaque button"
  • fa1cebe: 8303266: Prefer ArrayList to LinkedList in JImageTask
  • 5f153e0: 8302780: Add support for vectorized arraycopy GC barriers
  • d00a767: 8295737: macOS: Print content cut off when width > height with portrait orientation
  • 15c76e4: 8301254: UNIX sun/font coding does not detect SuSE in openSUSE Leap distribution
  • 3eff1a0: 8303630: Move nsk/jvmti/AttachOnDemand/attach002a/TestDescription.java back to general problem list
  • 10d6a8e: 8299518: HotSpotVirtualMachine shared code across different platforms
  • 148900c: 8303562: Remove obsolete comments in os::pd_attempt_reserve_memory_at
  • 1bb39a9: 8302027: Port fdlibm trig functions (sin, cos, tan) to Java
  • 9fdbf3c: 8303588: [JVMCI] make JVMCI source directories conform with standard layout
  • ... and 92 more: https://git.openjdk.org/jdk/compare/a43931b79cb25d218e8f9b4d4f3a106f59cb2d37...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 6, 2023

@albertnetymk Pushed as commit ec4e8aa.

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

@albertnetymk albertnetymk deleted the g1-clear-memregion branch March 6, 2023 10:51
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
Development

Successfully merging this pull request may close these issues.

3 participants