Skip to content

Commit 31d8a19

Browse files
sunny868Igor Veresov
authored andcommitted
8265105: gc/arguments/TestSelectDefaultGC.java fails when compiler1 is disabled
Reviewed-by: iveresov
1 parent 657f103 commit 31d8a19

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/hotspot/share/compiler/compilerDefinitions.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ intx CompilerConfig::scaled_freq_log(intx freq_log, double scale) {
159159
}
160160
}
161161

162-
void set_client_emulation_mode_flags() {
162+
void CompilerConfig::set_client_emulation_mode_flags() {
163+
assert(has_c1(), "Must have C1 compiler present");
163164
CompilationModeFlag::set_quick_only();
164165

165166
FLAG_SET_ERGO(ProfileInterpreter, false);
@@ -560,17 +561,19 @@ void CompilerConfig::ergo_initialize() {
560561
return;
561562
#endif
562563

563-
if (!is_compilation_mode_selected()) {
564+
if (has_c1()) {
565+
if (!is_compilation_mode_selected()) {
564566
#if defined(_WINDOWS) && !defined(_LP64)
565-
if (FLAG_IS_DEFAULT(NeverActAsServerClassMachine)) {
566-
FLAG_SET_ERGO(NeverActAsServerClassMachine, true);
567-
}
567+
if (FLAG_IS_DEFAULT(NeverActAsServerClassMachine)) {
568+
FLAG_SET_ERGO(NeverActAsServerClassMachine, true);
569+
}
568570
#endif
569-
if (NeverActAsServerClassMachine) {
571+
if (NeverActAsServerClassMachine) {
572+
set_client_emulation_mode_flags();
573+
}
574+
} else if (!has_c2() && !is_jvmci_compiler()) {
570575
set_client_emulation_mode_flags();
571576
}
572-
} else if (!has_c2() && !is_jvmci_compiler()) {
573-
set_client_emulation_mode_flags();
574577
}
575578

576579
set_legacy_emulation_flags();

src/hotspot/share/compiler/compilerDefinitions.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ class CompilerConfig : public AllStatic {
246246
static void set_compilation_policy_flags();
247247
static void set_jvmci_specific_flags();
248248
static void set_legacy_emulation_flags();
249+
static void set_client_emulation_mode_flags();
249250
};
250251

251252
#endif // SHARE_COMPILER_COMPILERDEFINITIONS_HPP

0 commit comments

Comments
 (0)