Skip to content

Conversation

@tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Feb 25, 2025

Hi all,

in the G1SurvRateGroup class there are three loops that use a size_t loop iteration variable that is compared to uints in the condition, causing some implicit narrowing.

Change the loop variables to also use uints.

Pointed out by @kimbarrett during review of JDK-8349906.

Testing: local compilation, GHA, checking other loop variables to match type

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-8350643: G1: Make loop iteration variable type correspond to limit in G1SurvRateGroup (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23773

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

Using diff file

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

Using Webrev

Link to Webrev Comment

Hi all,

 in the G1SurvRateGroup class there are three loops that use a `size_t` loop iteration variable that is compared to `uint`s in the condition, causing some implicit narrowing.

Change the loop variables to also use `uints`.

Pointed out by @kimbarrett during review of JDK-8349906.

Testing: local compilation, github testing, checking other loop variables to match type

Thanks,
  Thomas
@bridgekeeper
Copy link

bridgekeeper bot commented Feb 25, 2025

👋 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
Copy link

openjdk bot commented Feb 25, 2025

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

8350643: G1: Make loop iteration variable type correspond to limit in G1SurvRateGroup

Reviewed-by: ayang, 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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 changed the title 8350643 8350643: G1: Make loop iteration variable type correspond to limit in G1SurvRateGroup Feb 25, 2025
@openjdk
Copy link

openjdk bot commented Feb 25, 2025

@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 Feb 25, 2025
@tschatzl tschatzl marked this pull request as ready for review February 25, 2025 12:19
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 25, 2025
@mlbridge
Copy link

mlbridge bot commented Feb 25, 2025

Webrevs

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 openjdk bot added the ready Pull request is ready to be integrated label Feb 26, 2025
@tschatzl
Copy link
Contributor Author

Thanks @albertnetymk @kimbarrett for your reviews
/integrate

@openjdk
Copy link

openjdk bot commented Feb 26, 2025

@tschatzl Since your change was applied there have been 26 commits pushed to the master branch:

  • aac9cb4: 8349906: G1: Improve initial survivor rate for newly used young regions
  • a431046: 8350518: org.openjdk.bench.java.util.TreeMapUpdate.compute fails with "java.lang.IllegalArgumentException: key out of range"
  • a70eba8: 8330174: Protection zone for easier detection of accidental zero-nKlass use
  • f529bf7: 8350483: AArch64: turn on signum intrinsics by default on Ampere CPUs
  • 037e471: 8350666: cmp-baseline builds fail after JDK-8280682
  • c8a521f: 8345213: JVM Prefers /etc/timezone Over /etc/localtime on Debian 12
  • 86024eb: 8348426: Generate binary file for -XX:AOTMode=record -XX:AOTConfiguration=file
  • 267d69b: 8326447: jpackage creates Windows installers that cannot be signed
  • 2efb033: 8350601: Miscellaneous updates to jpackage test lib
  • d4fdc79: 8344981: [REDO] JDK-6672644 JComboBox still scrolling if switch to another window and return back
  • ... and 16 more: https://git.openjdk.org/jdk/compare/d551dacaef938cea0cad10047b79a0a7a26dcacb...master

It was not possible to rebase your changes automatically. Please merge master into your branch and try again.

@tschatzl tschatzl closed this Feb 26, 2025
@tschatzl tschatzl deleted the submit/8350643-loop-counter-variable-type branch February 26, 2025 11:07
@tschatzl tschatzl restored the submit/8350643-loop-counter-variable-type branch February 26, 2025 11:11
@tschatzl tschatzl reopened this Feb 26, 2025
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Feb 26, 2025
@tschatzl
Copy link
Contributor Author

This branch needed merging before integration, so needs a re-review. Nothing changed.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 26, 2025
@tschatzl
Copy link
Contributor Author

Thanks @albertnetymk @kimbarrett for your reviews

/integrate

@openjdk
Copy link

openjdk bot commented Feb 26, 2025

Going to push as commit a0dd565.

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

openjdk bot commented Feb 26, 2025

@tschatzl Pushed as commit a0dd565.

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

@tschatzl tschatzl deleted the submit/8350643-loop-counter-variable-type branch October 15, 2025 11:34
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