Skip to content

8290715: Fix incorrect uses of G1CollectedHeap::heap_region_containing() #9584

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

Conversation

tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Jul 21, 2022

Hi all,

please review this change that fixes some callers of G1CollectedHeap::heap_region_containing to a) fail on trying to get the Heapregion* on uncommitted regions and b) change some callers to use the correct heap_region_containing_or_null method that had been intended there.

Also remove some now unneccessary asserts as heap_region_containing will fail when it previously returned nullptr.

Testing: tier1-5

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-8290715: Fix incorrect uses of G1CollectedHeap::heap_region_containing()

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9584

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 21, 2022

👋 Welcome back tschatzl! A progress list of the required criteria for merging this PR into pr/9572 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 8290715 8290715: Fix incorrect uses of G1CollectedHeap::heap_region_containing() Jul 21, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 21, 2022
@openjdk
Copy link

openjdk bot commented Jul 21, 2022

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

  • hotspot

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 hotspot-dev@openjdk.org label Jul 21, 2022
@mlbridge
Copy link

mlbridge bot commented Jul 21, 2022

Webrevs

@tschatzl
Copy link
Contributor Author

/label add hotspot-gc

@openjdk openjdk bot added the hotspot-gc hotspot-gc-dev@openjdk.org label Jul 21, 2022
@openjdk
Copy link

openjdk bot commented Jul 21, 2022

@tschatzl
The hotspot-gc label was successfully added.

@openjdk-notifier openjdk-notifier bot changed the base branch from pr/9572 to master July 27, 2022 20:11
@openjdk-notifier
Copy link

The dependent pull request has now been integrated, and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork:

git checkout submit/refs/heads/8290715-heapregion-containing-no-null
git fetch https://git.openjdk.org/jdk master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk
Copy link

openjdk bot commented Jul 27, 2022

@tschatzl this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout submit/refs/heads/8290715-heapregion-containing-no-null
git fetch https://git.openjdk.org/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Jul 27, 2022
@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label Jul 28, 2022
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 Jul 28, 2022

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

8290715: Fix incorrect uses of G1CollectedHeap::heap_region_containing()

Reviewed-by: kbarrett, sangheki

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

  • 18cd16d: 8291003: ARM32: constant_table.size assertion
  • cfe9026: 8289511: Improve test coverage for XPath Axes: child
  • eeac3da: 8289755: Remove --enable-reproducible-build from jib profile
  • 791fc57: 6383195: javax.crypto.spec.PBEKeySpec is not thread safe
  • e052d7f: 8288477: nmethod header size reduction
  • 54a2c5a: 8290059: Do not use std::thread in panama tests
  • 5214a17: 8291479: ProblemList compiler/rangechecks/TestRangeCheckHoistingScaledIV.java on ppc64le
  • 471a427: 8287794: Reverse*VNode::Identity problem
  • 5d1ad39: 8290839: jdk/jfr/event/compiler/TestJitRestart.java failed with "RuntimeException: No JIT restart event found: expected true, was false"

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 Jul 28, 2022
Copy link
Member

@sangheon sangheon 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.

@tschatzl
Copy link
Contributor Author

Thanks @kimbarrett @sangheon for your reviews.

@tschatzl
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jul 29, 2022

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

  • 18cd16d: 8291003: ARM32: constant_table.size assertion
  • cfe9026: 8289511: Improve test coverage for XPath Axes: child
  • eeac3da: 8289755: Remove --enable-reproducible-build from jib profile
  • 791fc57: 6383195: javax.crypto.spec.PBEKeySpec is not thread safe
  • e052d7f: 8288477: nmethod header size reduction
  • 54a2c5a: 8290059: Do not use std::thread in panama tests
  • 5214a17: 8291479: ProblemList compiler/rangechecks/TestRangeCheckHoistingScaledIV.java on ppc64le
  • 471a427: 8287794: Reverse*VNode::Identity problem
  • 5d1ad39: 8290839: jdk/jfr/event/compiler/TestJitRestart.java failed with "RuntimeException: No JIT restart event found: expected true, was false"

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jul 29, 2022

@tschatzl Pushed as commit f58e08e.

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

@tschatzl tschatzl deleted the submit/refs/heads/8290715-heapregion-containing-no-null branch July 29, 2022 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org 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