Skip to content
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

8265105: gc/arguments/TestSelectDefaultGC.java fails when compiler1 is disabled #3449

Closed
wants to merge 1 commit into from

Conversation

@sunny868
Copy link

@sunny868 sunny868 commented Apr 13, 2021

On MIPS64 platform has not impliment C1,only has C2.
so when tiered compilation is off, it is unnecessary to set client emulation mode flags.
perhaps this bug be included by https://bugs.openjdk.java.net/browse/JDK-8251462


Progress

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

Issue

  • JDK-8265105: gc/arguments/TestSelectDefaultGC.java fails when compiler1 is disabled

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3449

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

Using diff file

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

@bridgekeeper bridgekeeper bot added the oca label Apr 13, 2021
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Apr 13, 2021

Hi @sunny868, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user sunny868" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 13, 2021

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

  • hotspot-compiler

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.

Loading

@sunny868 sunny868 changed the title 8265105: gc/arguments/TestSelectDefaultGC.java fails fails when compi… 8265105: gc/arguments/TestSelectDefaultGC.java fails fails when compiler1 is disabled Apr 13, 2021
@sunny868
Copy link
Author

@sunny868 sunny868 commented Apr 13, 2021

/covered
I am a Loongson employee

Loading

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Apr 13, 2021

Thank you! Please allow for a few business days to verify that your employer has signed the OCA. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

Loading

@sunny868 sunny868 changed the title 8265105: gc/arguments/TestSelectDefaultGC.java fails fails when compiler1 is disabled 8265105: gc/arguments/TestSelectDefaultGC.java fails when compiler1 is disabled Apr 13, 2021
@TobiHartmann
Copy link
Member

@TobiHartmann TobiHartmann commented Apr 13, 2021

Please add a description of your fix to the PR.

Loading

@mlbridge
Copy link

@mlbridge mlbridge bot commented Apr 14, 2021

Webrevs

Loading

Copy link
Member

@TobiHartmann TobiHartmann left a comment

@veresov should have a look at this.

Loading

@veresov
Copy link
Contributor

@veresov veresov commented Apr 16, 2021

So, you want the VM to ignore the NeverActAsServerClassMachine if it has C2 and not C1?

Loading

@sunny868
Copy link
Author

@sunny868 sunny868 commented Apr 17, 2021

Maybe yes. And I am not clear between TieredCompilation NeverActAsServerClassMachine and AlwaysActAsServerClassMachine much.

Loading

@veresov
Copy link
Contributor

@veresov veresov commented Apr 17, 2021

Ok, I'll try to reproduce it and take a look.

Loading

@veresov
Copy link
Contributor

@veresov veresov commented Apr 17, 2021

So, I would propose doing it the following way. Basically, I think we should put if (has_c1()) around the whole thing because NeverActAsServerClassMachine doesn't make any sense without C1.

diff --git a/src/hotspot/share/compiler/compilerDefinitions.cpp b/src/hotspot/share/compiler/compilerDefinitions.cpp
index f8eff0a6917..7db439373a1 100644
--- a/src/hotspot/share/compiler/compilerDefinitions.cpp
+++ b/src/hotspot/share/compiler/compilerDefinitions.cpp
@@ -159,7 +159,8 @@ intx CompilerConfig::scaled_freq_log(intx freq_log, double scale) {
   }
 }
 
-void set_client_emulation_mode_flags() {
+void CompilerConfig::set_client_emulation_mode_flags() {
+  assert(has_c1(), "Must have C1 compiler present");
   CompilationModeFlag::set_quick_only();
 
   FLAG_SET_ERGO(ProfileInterpreter, false);
@@ -560,17 +561,19 @@ void CompilerConfig::ergo_initialize() {
   return;
 #endif
 
-  if (!is_compilation_mode_selected()) {
+  if (has_c1()) {
+    if (!is_compilation_mode_selected()) {
 #if defined(_WINDOWS) && !defined(_LP64)
-    if (FLAG_IS_DEFAULT(NeverActAsServerClassMachine)) {
-      FLAG_SET_ERGO(NeverActAsServerClassMachine, true);
-    }
+      if (FLAG_IS_DEFAULT(NeverActAsServerClassMachine)) {
+        FLAG_SET_ERGO(NeverActAsServerClassMachine, true);
+      }
 #endif
-    if (NeverActAsServerClassMachine) {
+      if (NeverActAsServerClassMachine) {
+        set_client_emulation_mode_flags();
+      }
+    } else if (!has_c2() && !is_jvmci_compiler()) {
       set_client_emulation_mode_flags();
     }
-  } else if (!has_c2() && !is_jvmci_compiler()) {
-    set_client_emulation_mode_flags();
   }
 
   set_legacy_emulation_flags();
diff --git a/src/hotspot/share/compiler/compilerDefinitions.hpp b/src/hotspot/share/compiler/compilerDefinitions.hpp
index d87c892f091..2f8794ad43a 100644
--- a/src/hotspot/share/compiler/compilerDefinitions.hpp
+++ b/src/hotspot/share/compiler/compilerDefinitions.hpp
@@ -246,6 +246,7 @@ private:
   static void set_compilation_policy_flags();
   static void set_jvmci_specific_flags();
   static void set_legacy_emulation_flags();
+  static void set_client_emulation_mode_flags();
 };
 
 #endif // SHARE_COMPILER_COMPILERDEFINITIONS_HPP

Loading

@sunny868
Copy link
Author

@sunny868 sunny868 commented Apr 18, 2021

OK, thank you. I'll update this patch later

Loading

@sunny868
Copy link
Author

@sunny868 sunny868 commented Apr 19, 2021

/test

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 19, 2021

@sunny868 you need to get approval to run the tests in tier1 for commits up until c21468f

Loading

@openjdk openjdk bot added the test-request label Apr 19, 2021
Copy link
Contributor

@veresov veresov left a comment

Looks good.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 19, 2021

⚠️ @sunny868 the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:

$ git checkout dev
$ git commit -c user.name='Preferred Full Name' --allow-empty -m 'Update full name'
$ git push

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 19, 2021

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

8265105: gc/arguments/TestSelectDefaultGC.java fails when compiler1 is disabled

Reviewed-by: iveresov

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 164 new commits pushed to the master branch:

  • ca6b1b4: 8171381: [TEST_BUG] [macos] javax/swing/JPopupMenu/7156657/bug7156657.java fails on OS X
  • 9e7c748: 8265700: Regularize throws clauses in BigDecimal
  • 7116321: 8254565: JFR: Incorrect verification of mirror events
  • f45d460: 8265017: runtime/HiddenClasses/StressHiddenClasses.java timed out on Win* OCI
  • 0136c89: 8265490: Unterminated string passed to FindClass() in hotspot test
  • 325edbc: 8265450: Merge PreservedMarksSet::restore code paths
  • b337f63: 8037397: RegEx pattern matching loses character class after intersection (&&) operator
  • 07a7510: 8200145: Conditional expression mistakenly treated as standalone
  • 41fc7dd: 8199079: Test javax/swing/UIDefaults/6302464/bug6302464.java is unstable
  • 45c474a: 8168408: Test java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java fails intermittentently on windows
  • ... and 154 more: https://git.openjdk.java.net/jdk/compare/008fc75a290f0286fb30c3b0a2f5abada441149c...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.

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 (@TobiHartmann, @veresov) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

Loading

@openjdk openjdk bot added the ready label Apr 19, 2021
@sunny868
Copy link
Author

@sunny868 sunny868 commented Apr 21, 2021

/integrate

Loading

@openjdk openjdk bot added the sponsor label Apr 21, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Apr 21, 2021

@sunny868
Your change (at version c21468f) is now ready to be sponsored by a Committer.

Loading

@veresov
Copy link
Contributor

@veresov veresov commented Apr 21, 2021

Let me do some testing just in case, I'll push it if it's clean.

Loading

@veresov
Copy link
Contributor

@veresov veresov commented Apr 21, 2021

/test

Loading

@openjdk openjdk bot removed the test-request label Apr 21, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Apr 21, 2021

Could not create test job

Loading

@veresov
Copy link
Contributor

@veresov veresov commented Apr 21, 2021

/test tier1

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 21, 2021

Could not create test job

Loading

@sunny868
Copy link
Author

@sunny868 sunny868 commented Apr 22, 2021

/test

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 22, 2021

@sunny868 you need to get approval to run the tests in tier1 for commits up until c21468f

Loading

@openjdk openjdk bot added the test-request label Apr 22, 2021
@sunny868
Copy link
Author

@sunny868 sunny868 commented Apr 22, 2021

/test tier1

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 22, 2021

@sunny868 you need to get approval to run the tests in tier1 for commits up until c21468f

Loading

@veresov
Copy link
Contributor

@veresov veresov commented Apr 22, 2021

/test approve

Loading

@openjdk openjdk bot removed the test-request label Apr 22, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Apr 22, 2021

Could not create test job

Loading

@veresov
Copy link
Contributor

@veresov veresov commented Apr 22, 2021

Ok, the internal testing looks good. I think we're ready to go.

Loading

@veresov
Copy link
Contributor

@veresov veresov commented Apr 22, 2021

/sponsor

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 22, 2021

@veresov @sunny868 Since your change was applied there have been 179 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

Pushed as commit 31d8a19.

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

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants