Skip to content
This repository was archived by the owner on Sep 2, 2022. It is now read-only.
/ jdk17 Public archive

8267271: Fix gc/arguments/TestNewRatioFlag.java expectedNewSize calculation #28

Closed
wants to merge 1 commit into from

Conversation

kstefanj
Copy link
Contributor

@kstefanj kstefanj commented Jun 11, 2021

Please review this test-fix to avoid failures on certain platforms.

Summary
Fixes an incorrect calculation in the test when trying to predict the new size given the NewRatio. The fix is not strictly bound to different platforms but to the resulting heap-size the test is run with. Both with Serial and Parallel the test fails if run on a platform using a heap alignment that forces the heap to be 104 MB instead of the specified 100 MB. It is a bit unclear why the test even passes with 100MB, since the calculation done in the test doesn't match the calculation done in the JVM.

Testing
Manual testing to verify the fix actually fixes the issue and works with multiple page sizes. Mach5 testing on affected platforms to verify the fix is good there as well.


Progress

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

Issue

  • JDK-8267271: Fix gc/arguments/TestNewRatioFlag.java expectedNewSize calculation

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk17 pull/28/head:pull/28
$ git checkout pull/28

Update a local copy of the PR:
$ git checkout pull/28
$ git pull https://git.openjdk.java.net/jdk17 pull/28/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk17/pull/28.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 11, 2021

👋 Welcome back sjohanss! 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
Copy link

openjdk bot commented Jun 11, 2021

@kstefanj 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.java.net label Jun 11, 2021
@kstefanj kstefanj changed the title Fix gc/arguments/TestNewRatioFlag.java expectedNewSize calculation 8267271: Fix gc/arguments/TestNewRatioFlag.java expectedNewSize calculation Jun 11, 2021
@kstefanj kstefanj marked this pull request as ready for review June 14, 2021 07:34
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 14, 2021
@mlbridge
Copy link

mlbridge bot commented Jun 14, 2021

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. Took a while to find the corresponding code in the VM :)

@openjdk
Copy link

openjdk bot commented Jun 15, 2021

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

8267271: Fix gc/arguments/TestNewRatioFlag.java expectedNewSize calculation

Reviewed-by: tschatzl, 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 75 new commits pushed to the master branch:

  • 4d545a1: 8267988: C2: assert(!addp->is_AddP() || addp->in(AddPNode::Base)->is_top() || addp->in(AddPNode::Base) == n->in(AddPNode::Base)) failed: Base pointers must match (addp 1301)
  • b18de6c: 8268851: ProblemList jdk/jfr/event/gc/detailed/TestEvacuationFailedEvent.java on linux-X64
  • 10068c1: 8268830: ProblemList 3 serviceability/dcmd/framework tests with ZGC on win-x64
  • 788b309: 8268768: idea.sh has been updated in surprising and incompatible ways
  • 9ac0609: 8268828: ProblemList compiler/intrinsics/VectorizedMismatchTest.java on win-x64
  • fe7a44d: 8268723: Problem list SA core file tests on OSX when using ZGC
  • 31a055e: 8268736: Use apiNote in AutoCloseable.close javadoc
  • 76cad4b: 8263321: Regression 8% in javadoc-steady in 17-b11
  • e36136f: 8268125: ZGC: Clone oop array gets wrong acopy stub
  • 35d867d: 8268663: Crash when guards contain boolean expression
  • ... and 65 more: https://git.openjdk.java.net/jdk17/compare/caf7f49887db3ea26ee302f37941f196b3a76f3f...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 Jun 15, 2021
@kstefanj
Copy link
Contributor Author

Lgtm. Took a while to find the corresponding code in the VM :)

Yes, that's why I opted to add the comment about it. =) Thanks for reviewing.

@tschatzl
Copy link
Contributor

tschatzl commented Jun 15, 2021

Yes, I could have read the entire fix before diving into the code after seeing the deletions... ;)

Copy link
Contributor

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

@kstefanj
Copy link
Contributor Author

Thanks @tschatzl and @kimbarrett for the reviews.

/integrate

@openjdk
Copy link

openjdk bot commented Jun 16, 2021

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

  • 4d545a1: 8267988: C2: assert(!addp->is_AddP() || addp->in(AddPNode::Base)->is_top() || addp->in(AddPNode::Base) == n->in(AddPNode::Base)) failed: Base pointers must match (addp 1301)
  • b18de6c: 8268851: ProblemList jdk/jfr/event/gc/detailed/TestEvacuationFailedEvent.java on linux-X64
  • 10068c1: 8268830: ProblemList 3 serviceability/dcmd/framework tests with ZGC on win-x64
  • 788b309: 8268768: idea.sh has been updated in surprising and incompatible ways
  • 9ac0609: 8268828: ProblemList compiler/intrinsics/VectorizedMismatchTest.java on win-x64
  • fe7a44d: 8268723: Problem list SA core file tests on OSX when using ZGC
  • 31a055e: 8268736: Use apiNote in AutoCloseable.close javadoc
  • 76cad4b: 8263321: Regression 8% in javadoc-steady in 17-b11
  • e36136f: 8268125: ZGC: Clone oop array gets wrong acopy stub
  • 35d867d: 8268663: Crash when guards contain boolean expression
  • ... and 65 more: https://git.openjdk.java.net/jdk17/compare/caf7f49887db3ea26ee302f37941f196b3a76f3f...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jun 16, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 16, 2021
@openjdk
Copy link

openjdk bot commented Jun 16, 2021

@kstefanj Pushed as commit 59de99d.

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hotspot-gc hotspot-gc-dev@openjdk.java.net integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants