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

8295402: G1: Tighten assertion in G1ScanHRForRegionClosure::scan_heap_roots #10725

Closed

Conversation

albertnetymk
Copy link
Member

@albertnetymk albertnetymk commented Oct 17, 2022

Simple change of asserting the to-be-scanned card is strictly dirty.

Test: tier1-6


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-8295402: G1: Tighten assertion in G1ScanHRForRegionClosure::scan_heap_roots

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10725

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 17, 2022

👋 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 8295402 8295402: G1: Tighten assertion in G1ScanHRForRegionClosure::scan_heap_roots Oct 17, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 17, 2022
@openjdk
Copy link

openjdk bot commented Oct 17, 2022

@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 Oct 17, 2022
@mlbridge
Copy link

mlbridge bot commented Oct 17, 2022

Webrevs

Copy link
Contributor

@tschatzl tschatzl left a comment

Choose a reason for hiding this comment

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

Lgtm.

Comment on lines +835 to +840
#ifdef ASSERT
{
CardTable::CardValue value = *_ct->byte_for_index(region_card_base_idx + first_scan_idx);
assert(value == CardTable::dirty_card_val(), "is %d at region %u idx " SIZE_FORMAT, value, region_idx, first_scan_idx);
}
#endif
Copy link
Contributor

@tschatzl tschatzl Oct 17, 2022

Choose a reason for hiding this comment

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

Suggested change
#ifdef ASSERT
{
CardTable::CardValue value = *_ct->byte_for_index(region_card_base_idx + first_scan_idx);
assert(value == CardTable::dirty_card_val(), "is %d at region %u idx " SIZE_FORMAT, value, region_idx, first_scan_idx);
}
#endif
DEBUG_ONLY(CardTable::CardValue value = *_ct->byte_for_index(region_card_base_idx + first_scan_idx);)
assert(value == CardTable::dirty_card_val(), "is %d at region %u idx " SIZE_FORMAT, value, region_idx, first_scan_idx);

Just fyi, an alternative that does not create that many lines with almost no content.

@openjdk
Copy link

openjdk bot commented Oct 17, 2022

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

8295402: G1: Tighten assertion in G1ScanHRForRegionClosure::scan_heap_roots

Reviewed-by: tschatzl, iwalulya

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

  • af2de97: 8287754: Update jib GNU make dependency on Windows to latest cygwin build
  • 9051dde: 8294993: LingeredApp test update
  • f37a605: 8295212: G1: Add wrapper for TruncatedSeqs that need separation by gc phase
  • 6673cd8: 8295554: Move the "sizecalc.h" to the correct location
  • 706d1b7: 8295798: (ch) Test java/nio/channels/Channels/ReadXBytes.java is very slow on Windows
  • 89dafc0: 8292699: Improve printing of classes in native debugger
  • 7520d0a: 8295855: ProblemList jdk/jshell/CommandCompletionTest.java on linux-all
  • 1d15e5c: 8295716: Minimize disabled warnings in security libs
  • 8c86e92: 8295847: slow debug build error after JDK-8294466
  • e122321: 8295844: jdk/test/whitebox/CPUInfoTest.java failed with "not all features are known: expected true, was false"
  • ... and 215 more: https://git.openjdk.org/jdk/compare/6ed74ef654f0b3e5c748895654d6925e2b832732...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 17, 2022
@albertnetymk
Copy link
Member Author

I think #ifdef is more visible than debug_only, enabling people to skip debug-only code quickly.

Thanks for the review.

/integrate

@openjdk
Copy link

openjdk bot commented Oct 26, 2022

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

  • 303548b: 8294752: G1: Remove redundant checks in check_obj_during_refinement
  • cf121df: 8295889: NMT preinit code does not handle allocation errors
  • 772be2e: 8295868: 32-bit Windows build failures after JDK-8294466
  • e173fd7: 8295885: GHA: Bump gcc versions
  • b2878c9: 8295710: remove os::dll_file_extension
  • e3a5a34: 8295767: Remove unused fields in sun.awt.geom.Edge
  • 324bec1: 8295863: JFR: Use expected size for Maps and Sets
  • 3bd3caf: 8294486: Remove vmTestbase/nsk/jvmti/ tests ported to serviceability/jvmti.
  • fec6174: 8295816: jdwp jck tests failing with "FATAL ERROR in native method: JDWP SetTag, jvmtiError=JVMTI_ERROR_WRONG_PHASE(112)"
  • e0c2930: 8295282: Use Zicboz/cbo.zero to zero-out memory on RISC-V
  • ... and 234 more: https://git.openjdk.org/jdk/compare/6ed74ef654f0b3e5c748895654d6925e2b832732...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 26, 2022

@albertnetymk Pushed as commit 33ff80d.

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

@albertnetymk albertnetymk deleted the g1-assert-card-dirty branch October 26, 2022 09:27
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