-
Notifications
You must be signed in to change notification settings - Fork 236
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
8254072: AArch64: Get rid of --disable-warnings-as-errors on Windows+ARM64 build #280
Conversation
👋 Welcome back rnkovacs! A progress list of the required criteria for merging this PR into |
This backport pull request has now been updated with issue from the original commit. |
/contributor add Bernhard Urban-Forster burban@openjdk.org |
@rnkovacs |
@rnkovacs can you update this PR as well to resolve the merge conflicts? |
f0e042a
to
d7975df
Compare
I did, thanks. |
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 (but I'm not a formal reviewer).
@@ -1333,7 +1333,7 @@ class StubGenerator: public StubCodeGenerator { | |||
// disjoint_int_copy_entry is set to the no-overlap entry point | |||
// used by generate_conjoint_int_oop_copy(). | |||
// | |||
address generate_disjoint_copy(size_t size, bool aligned, bool is_oop, address *entry, | |||
address generate_disjoint_copy(int size, bool aligned, bool is_oop, address *entry, |
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.
size_t is correct here.
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.
@rnkovacs This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@rnkovacs This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
/open |
@rnkovacs This pull request is now open |
Sorry for the delay. The new changes are:
|
assert(JavaThread::stack_shadow_zone_size() == (unsigned long)(int)JavaThread::stack_shadow_zone_size(), "must be same"); | ||
__ bang_stack_with_offset((int)JavaThread::stack_shadow_zone_size()); |
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.
assert(JavaThread::stack_shadow_zone_size() == (unsigned long)(int)JavaThread::stack_shadow_zone_size(), "must be same"); | |
__ bang_stack_with_offset((int)JavaThread::stack_shadow_zone_size()); | |
__ bang_stack_with_offset(checked_cast<int>(JavaThread::stack_shadow_zone_size())); |
@@ -1363,12 +1363,12 @@ class StubGenerator: public StubCodeGenerator { | |||
// save regs before copy_memory | |||
__ push(RegSet::of(d, count), sp); | |||
} | |||
copy_memory(aligned, s, d, count, rscratch1, size); | |||
copy_memory(aligned, s, d, count, rscratch1, (int)size); |
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.
copy_memory(aligned, s, d, count, rscratch1, (int)size); | |
copy_memory(aligned, s, d, count, rscratch1, checked_cast<int>(size)); |
|
||
if (is_oop) { | ||
__ pop(RegSet::of(d, count), sp); | ||
if (VerifyOops) | ||
verify_oop_array(size, d, count, r16); | ||
verify_oop_array((int)size, d, count, r16); |
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.
Likewise use checked_cast
.
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.
If you replace all of the int
casts with checked_cast<int>
, I'll approve this.
I replaced them. Thanks for the review. |
@rnkovacs This change now passes all automated pre-integration checks. 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 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@theRealAph) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
c5f9428
to
ec4df85
Compare
Rebased to latest master to fix merge conflict. |
The one test that fails on Linux x64 and x86 ( Could someone please sponsor the change? @theRealAph or @GoeLin maybe? |
it lost label "sponsor", so you probably need to /integrate again |
/sponsor |
Ah right, thanks @VladimirKempik. /integrate |
Sorry @adinn - could you please try again? |
/sponsor |
Going to push as commit b5f8c31.
Your commit was automatically rebased without conflicts. |
@VladimirKempik @rnkovacs Pushed as commit b5f8c31. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Thanks so much @VladimirKempik! |
@@ -89,7 +89,7 @@ class MacroAssembler: public Assembler { | |||
= (operand_valid_for_logical_immediate(false /*is32*/, | |||
(uint64_t)Universe::narrow_klass_base()) | |||
&& ((uint64_t)Universe::narrow_klass_base() | |||
> (1UL << log2_intptr((uintptr_t)Universe::narrow_klass_range())))); |
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.
I am getting a build issue when building on MacOS/aarch64 12.2.1 using Xcode 13.1. The cause being the uintptr_t
cast that was removed from line 92.
I resolved the issue by adding the cast back like so:
> (1UL << log2_intptr(checked_cast<uintptr_t>(Universe::narrow_klass_range())))));
If all looks well, I will have a colleague with Author status go ahead and create an issue on JBS for me so I can then submit the fix.
Here's the build error:
$ make images CONF=macosx-aarch64-normal-server-release
Building target 'images' in configuration 'macosx-aarch64-normal-server-release'
In file included from /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/precompiled/precompiled.hpp:111:
In file included from /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/interpreter/abstractInterpreter.hpp:28:
In file included from /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/asm/macroAssembler.hpp:31:
/Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp:92:25: error: call to 'log2_intptr' is ambiguous
> (1ULL << log2_intptr(Universe::narrow_klass_range()))));
^~~~~~~~~~~
In file included from /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/precompiled/precompiled.hpp:111:
In file included from /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/interpreter/abstractInterpreter.hpp:28:
In file included from /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/asm/macroAssembler.hpp:31:
/Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp:92:25: error: call to 'log2_intptr' is ambiguous
> (1ULL << log2_intptr(Universe::narrow_klass_range()))));
^~~~~~~~~~~
/Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/utilities/globalDefinitions.hpp:1094:12: note: candidate function
inline int log2_intptr(uintptr_t x) {
^
/Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/utilities/globalDefinitions.hpp:1120:12: note: candidate function
inline int log2_intptr(intptr_t x) {
^
/Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/utilities/globalDefinitions.hpp:1094:12: note: candidate function
inline int log2_intptr(uintptr_t x) {
^
/Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/utilities/globalDefinitions.hpp:1120:12: note: candidate function
inline int log2_intptr(intptr_t x) {
^
1 error generated.
1 error generated.
make[3]: *** [/Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/build/macosx-aarch64-normal-server-release/hotspot/variant-server/libjvm/gtest/objs/precompiled/precompiled.hpp.pch] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [/Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/build/macosx-aarch64-normal-server-release/hotspot/variant-server/libjvm/objs/precompiled/precompiled.hpp.pch] Error 1
make[2]: *** [hotspot-server-libs] Error 2
ERROR: Build failed for target 'images' in configuration 'macosx-aarch64-normal-server-release' (exit code 2)
=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_gtest_objs_precompiled_precompiled.hpp.pch:
In file included from /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/precompiled/precompiled.hpp:111:
In file included from /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/interpreter/abstractInterpreter.hpp:28:
In file included from /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/asm/macroAssembler.hpp:31:
/Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp:92:25: error: call to 'log2_intptr' is ambiguous
> (1ULL << log2_intptr(Universe::narrow_klass_range()))));
^~~~~~~~~~~
/Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/utilities/globalDefinitions.hpp:1094:12: note: candidate function
inline int log2_intptr(uintptr_t x) {
^
/Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/utilities/globalDefinitions.hpp:1120:12: note: candidate function
inline int log2_intptr(intptr_t x) {
^
1 error generated.
* For target hotspot_variant-server_libjvm_objs_precompiled_precompiled.hpp.pch:
In file included from /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/precompiled/precompiled.hpp:111:
In file included from /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/interpreter/abstractInterpreter.hpp:28:
In file included from /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/asm/macroAssembler.hpp:31:
/Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp:92:25: error: call to 'log2_intptr' is ambiguous
> (1ULL << log2_intptr(Universe::narrow_klass_range()))));
^~~~~~~~~~~
/Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/utilities/globalDefinitions.hpp:1094:12: note: candidate function
inline int log2_intptr(uintptr_t x) {
^
/Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/src/hotspot/share/utilities/globalDefinitions.hpp:1120:12: note: candidate function
inline int log2_intptr(intptr_t x) {
^
1 error generated.
* All command lines available in /Users/ahmed/Documents/dev/repos/jdk11u-dev-upstream/build/macosx-aarch64-normal-server-release/make-support/failure-logs.
=== End of repeated output ===
No indication of failed target found.
Hint: Try searching the build log for '] Error'.
Hint: See doc/building.html#troubleshooting for assistance.
make[1]: *** [main] Error 2
make: *** [images] Error 2
On 2/24/22 00:50, Ahmed Muhsin wrote:
I resolved the issue by adding the cast back like so:
` > (1UL << log2_intptr(checked_cast<uintptr_t>(Universe::narrow_klass_range())))));`
If all looks well, I will have a colleague with Author status go ahead and create an issue on JBS for me so I can then submit the fix.
Huh. It's not pretty, but it's probably the best we can do for 11. The
log2 functions have all been reworked in later JDKs.
The checked_cast perhaps isn't necessary because this isn't a narrowing
cast, but it doesn't hurt.
…--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
|
Despite its title, this patch only touches common code that's present before adding Windows/AArch64 support. Not a clean backport. Differences to the original commit:
make/hotspot/lib/CompileJvm.gmk
this introduces a newDISABLED_WARNINGS_microsoft
line.make/hotspot/lib/CompileGtest.gmk
.src/hotspot/cpu/aarch64/aarch64.ad
that's no longer present on tip (probably not worth a separate PR).Changes tosrc/hotspot/cpu/aarch64/frame_aarch64.cpp
don't yet include the changes from 8248414: AArch64: Remove uses of long and unsigned long ints #215.src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
needed some adjustment to compile. (I'm not sure how it compiles on tip, as I don't see-Wsign-compare
turned off there either, but the types seem to be the same.)This is part of the Windows/AArch64 port.
Progress
Issue
Reviewers
Contributors
<burban@openjdk.org>
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk11u-dev pull/280/head:pull/280
$ git checkout pull/280
Update a local copy of the PR:
$ git checkout pull/280
$ git pull https://git.openjdk.java.net/jdk11u-dev pull/280/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 280
View PR using the GUI difftool:
$ git pr show -t 280
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk11u-dev/pull/280.diff