8233429: Minimal and zero VM build broken after JDK-8227003
Reviewed-by: iveresov, shade, thartmann
Contributed-by: igor.veresov@oracle.com, fujie@loongson.cn
--- a/src/hotspot/share/compiler/compilerDefinitions.cpp Thu Oct 31 07:53:16 2019 +0100
+++ b/src/hotspot/share/compiler/compilerDefinitions.cpp Tue Nov 05 09:37:20 2019 +0800
@@ -211,7 +211,6 @@
}
}
-#endif // TIERED
void CompilerConfig::set_tiered_flags() {
// Increase the code cache size - tiered compiles a lot more.
@@ -292,6 +291,8 @@
}
}
+#endif // TIERED
+
#if INCLUDE_JVMCI
void set_jvmci_specific_flags() {
if (UseJVMCICompiler) {
@@ -474,9 +475,12 @@
set_jvmci_specific_flags();
#endif
+#ifdef TIERED
if (TieredCompilation) {
set_tiered_flags();
- } else {
+ } else
+#endif
+ {
// Scale CompileThreshold
// CompileThresholdScaling == 0.0 is equivalent to -Xint and leaves CompileThreshold unchanged.
if (!FLAG_IS_DEFAULT(CompileThresholdScaling) && CompileThresholdScaling > 0.0) {
--- a/src/hotspot/share/compiler/compilerDefinitions.hpp Thu Oct 31 07:53:16 2019 +0100
+++ b/src/hotspot/share/compiler/compilerDefinitions.hpp Tue Nov 05 09:37:20 2019 +0800
@@ -62,6 +62,7 @@
CompLevel_full_optimization = 4 // C2 or JVMCI
};
+#ifdef TIERED
class CompilationModeFlag : AllStatic {
static bool _quick_only;
static bool _high_only;
@@ -79,6 +80,7 @@
static void set_high_only_quick_internal(bool x) { _high_only_quick_internal = x; }
};
+#endif
extern CompLevel CompLevel_highest_tier;
extern CompLevel CompLevel_initial_compile;
@@ -147,7 +149,7 @@
static void ergo_initialize();
private:
- static void set_tiered_flags();
+ TIERED_ONLY(static void set_tiered_flags();)
};
#endif // SHARE_COMPILER_COMPILERDEFINITIONS_HPP
--- a/src/hotspot/share/runtime/arguments.cpp Thu Oct 31 07:53:16 2019 +0100
+++ b/src/hotspot/share/runtime/arguments.cpp Tue Nov 05 09:37:20 2019 +0800
@@ -4029,6 +4029,12 @@
no_shared_spaces("CDS Disabled");
#endif // INCLUDE_CDS
+#ifndef TIERED
+ if (FLAG_IS_CMDLINE(CompilationMode)) {
+ warning("CompilationMode has no effect in non-tiered VMs");
+ }
+#endif
+
return JNI_OK;
}
--- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp Thu Oct 31 07:53:16 2019 +0100
+++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp Tue Nov 05 09:37:20 2019 +0800
@@ -67,7 +67,7 @@
int min_number_of_compiler_threads = 0;
#if !defined(COMPILER1) && !defined(COMPILER2) && !INCLUDE_JVMCI
// case 1
-#else
+#elif defined(TIERED)
if (TieredCompilation) {
if (TieredStopAtLevel < CompLevel_full_optimization || CompilationModeFlag::quick_only()) {
min_number_of_compiler_threads = 1; // case 3
@@ -81,7 +81,9 @@
} else {
min_number_of_compiler_threads = 2; // case 4 (tiered)
}
- } else {
+ } else
+#else
+ {
min_number_of_compiler_threads = 1; // case 2
}
#endif