Skip to content

8355570: [s390x] Update -march to z13 generation #24869

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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

offamitkumar
Copy link
Member

@offamitkumar offamitkumar commented Apr 25, 2025

updated march level from z10 to z13.

Testing: tier1 (fastdebug-vm)


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-8355570: [s390x] Update -march to z13 generation (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24869

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 25, 2025

👋 Welcome back amitkumar! 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 Apr 25, 2025

@offamitkumar This change is no longer ready for integration - check the PR body for details.

@openjdk openjdk bot changed the title 8355570 8355570: [s390x] Update -march to z13 generation Apr 25, 2025
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 25, 2025
@openjdk
Copy link

openjdk bot commented Apr 25, 2025

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

  • build

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 build build-dev@openjdk.org label Apr 25, 2025
@mlbridge
Copy link

mlbridge bot commented Apr 25, 2025

Webrevs

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 25, 2025
@offamitkumar
Copy link
Member Author

That's weird, the build for s390x is failing in cross compile:

=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_libgtest_objs_gmock-all.o:
In file included from /home/runner/work/jdk/jdk/gtest/googlemock/src/gmock-all.cc:46:
In function ‘void testing::internal::InitGoogleMockImpl(int*, CharType**) [with CharType = char]’,
    inlined from ‘void testing::internal::InitGoogleMockImpl(int*, CharType**) [with CharType = char]’ at /home/runner/work/jdk/jdk/gtest/googlemock/src/gmock.cc:145:6,
    inlined from ‘void testing::InitGoogleMock()’ at /home/runner/work/jdk/jdk/gtest/googlemock/src/gmock.cc:222:31:
/home/runner/work/jdk/jdk/gtest/googlemock/src/gmock.cc:177:17: error: ‘void* __builtin_memmove(void*, const void*, long unsigned int)’ writing between 8 and 34359738368 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  177 |         argv[j] = argv[j + 1];
      |         ~~~~~~~~^~~~~~~
cc1plus: all warnings being treated as errors
* For target hotspot_variant-server_libjvm_objs_jvmtiAgent.o:
In function ‘void vm_exit(const JvmtiAgent*, const char*, const char*)’,
    inlined from ‘void* load_agent_from_absolute_path(JvmtiAgent*, bool)’ at /home/runner/work/jdk/jdk/src/hotspot/share/prims/jvmtiAgent.cpp:281:12,
    inlined from ‘void* load_library(JvmtiAgent*, bool)’ at /home/runner/work/jdk/jdk/src/hotspot/share/prims/jvmtiAgent.cpp:311:67,
    inlined from ‘jint (* lookup_On_Load_entry_point(JvmtiAgent*, const char*, bool))(JavaVM*, char*, void*)’ at /home/runner/work/jdk/jdk/src/hotspot/share/prims/jvmtiAgent.cpp:326:41,
    inlined from ‘jint (* lookup_JVM_OnLoad_entry_point(JvmtiAgent*, bool))(JavaVM*, char*, void*)’ at /home/runner/work/jdk/jdk/src/hotspot/share/prims/jvmtiAgent.cpp:344:36,
    inlined from ‘bool invoke_JVM_OnLoad(JvmtiAgent*)’ at /home/runner/work/jdk/jdk/src/hotspot/share/prims/jvmtiAgent.cpp:374:62,
    inlined from ‘bool JvmtiAgent::load(outputStream*)’ at /home/runner/work/jdk/jdk/src/hotspot/share/prims/jvmtiAgent.cpp:620:29:
/home/runner/work/jdk/jdk/src/hotspot/share/prims/jvmtiAgent.cpp:245:154: error: argument 1 null where non-null expected [-Werror=nonnull]
  245 |   const size_t len = strlen(not_found_error_msg) + strlen(agent->name()) + strlen(sub_msg1) + strlen(&ebuf[0]) + 1 + (agent->is_instrument_lib() ? strlen(sub_msg2) : 0);
      |                                                                                                                                                    ~~~~~~^~~~~~~~~~
In file included from /home/runner/work/jdk/jdk/src/hotspot/share/utilities/globalDefinitions_gcc.hpp:37,
                 from /home/runner/work/jdk/jdk/src/hotspot/share/utilities/globalDefinitions.hpp:36,
                 from /home/runner/work/jdk/jdk/src/hotspot/share/utilities/align.hpp:31,
                 from /home/runner/work/jdk/jdk/src/hotspot/share/runtime/globals_shared.hpp:28,
                 from /home/runner/work/jdk/jdk/src/hotspot/share/cds/cds_globals.hpp:28,
   ... (rest of output omitted)

I tested on my system and tier1 test were totally fine, Head stream build is not broken for s390x.

@magicus
Copy link
Member

magicus commented Apr 28, 2025

This is a failure when building the gtest framework.

Could this different arch flag be sensitive to different gcc versions? When you say you tested locally, what gcc version did you use?

@offamitkumar
Copy link
Member Author

This is a failure when building the gtest framework.

Could this different arch flag be sensitive to different gcc versions? When you say you tested locally, what gcc version did you use?

This is the config: gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)

@magicus
Copy link
Member

magicus commented May 5, 2025

GHA is using gcc 10.5.0 and it does not work. Maybe you can try building locally with 10.5.0 and see if you can reproduce the problem? Otherwise I have no suggestions to offer. But if you want to integrate this change, it cannot break GHA.

@offamitkumar
Copy link
Member Author

GHA is using gcc 10.5.0 and it does not work. Maybe you can try building locally with 10.5.0 and see if you can reproduce the problem? Otherwise I have no suggestions to offer. But if you want to integrate this change, it cannot break GHA.

Just one thing I am not able to understand. How does changing the minimum-architecture will results into this build failure. GHA is using same gcc for other PRs as well and they are totally working fine. And in this PR I haven't interfered with GCC at all.

If any error then I was expecting more of running into SIGILL but certainly not a compile failure.

Copy link
Contributor

@RealLucy RealLucy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an overdue change, I agree.
BUT: I would like to see successful PRODUCT tests. This change enables new gcc optimizations which fully kick in only in the release build.
Out of curiosity: do you see any performance gain?
This PR interferes with gcc by means of modified parameters. Do the change incrementally to find the culprit. Annoying, but necessary.

@offamitkumar
Copy link
Member Author

This change enables new gcc optimizations which fully kick in only in the release build.

locally both fastdebug + release builds are totally fine, I did build + tier1 test run and didn't see any issue.

do you see any performance gain?

I haven't ran any benchmarks yet, just trying to figure out the reason of build failure.

@offamitkumar offamitkumar marked this pull request as draft May 16, 2025 10:09
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 16, 2025
@offamitkumar
Copy link
Member Author

Ok. I am able to reproduce the error locally now. But I am not sure how we should proceed. I asked in my team and they suggested to disable the warnings. Because it is only caused by the older gcc compiler. As I mentioned as well, that with my current local setup(gcc-11.4) I don't see these warnings.

@magicus
Copy link
Member

magicus commented Jun 11, 2025

It looks like the failure was in gtest code. We have recently upgraded to a new version of googletest. Maybe you should just merge with master and try again?

@offamitkumar
Copy link
Member Author

@magicus, still the error is there:

/home/runner/work/jdk/jdk/gtest/googlemock/src/gmock.cc:177:17: error: ‘void* __builtin_memmove(void*, const void*, long unsigned int)’ writing between 8 and 34359738368 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  177 |         argv[j] = argv[j + 1];
      |         ~~~~~~~~^~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

4 participants