-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8308396: Fix offset_of conversion warnings in runtime code #14053
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
… or add int cast in the cases where too much code downstream does arithmetic with the offset.
…e which require in_bytes() to get to int.
|
👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing for fastdebug build/ tier1 tests looks good on s390x.
I've given my suggestion for fixing the build-break, but I leave that upto you :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
This looks good to me, with one small nit.
|
@coleenp 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: 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 62 new commits pushed to the
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, only a few comments on the style.
|
Thank you for reviewing Amit, Johan and Fred. |
|
Going to push as commit 265f40b.
Your commit was automatically rebased without conflicts. |
Please review this change to use ByteSize and byte_offset_of() to refer to offsets to metadata and other types that are used in generated code. This avoids the int narrowing conversion warning for -Wconversion. There were a couple that I just added an (int) cast instead because these offsets are either being used in other code currently being changed (in oopDesc) or there are too many (like displaced_header_offset_in_bytes) and should be their own change.
This change takes a chunk out of the -Wconversion warnings - see CR for more info.
It might be easier and less tedious to review the commits separately. One commit renames blah_offset_in_bytes to blah_offset, since in_bytes(blah_offset()) is typically used (except in Address constructor which has an overload for ByteSize).
Tested with tier1-4, x86 and aarch64, and built linux-x64-zero linux-x64-zero-debug linux-aarch64-debug linux-s390x-open linux-arm32-debug linux-ppc64le-debug linux-riscv64-debug locally.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14053/head:pull/14053$ git checkout pull/14053Update a local copy of the PR:
$ git checkout pull/14053$ git pull https://git.openjdk.org/jdk.git pull/14053/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14053View PR using the GUI difftool:
$ git pr show -t 14053Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14053.diff
Webrev
Link to Webrev Comment