hotspot/src/share/vm/runtime/arguments.cpp
changeset 31521 f57b2ce43484
parent 31390 7f35f0462aea
child 31627 a7141b9a8e0f
child 33963 67bb2ab03c00
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Tue Jun 30 12:12:18 2015 -0700
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Tue Jun 30 14:44:53 2015 -0700
@@ -3753,8 +3753,12 @@
   if (TieredCompilation) {
     set_tiered_flags();
   } else {
-    // Check if the policy is valid. Policies 0 and 1 are valid for non-tiered setup.
-    if (CompilationPolicyChoice >= 2) {
+    int max_compilation_policy_choice = 1;
+#ifdef COMPILER2
+    max_compilation_policy_choice = 2;
+#endif
+    // Check if the policy is valid.
+    if (CompilationPolicyChoice >= max_compilation_policy_choice) {
       vm_exit_during_initialization(
         "Incompatible compilation policy selected", NULL);
     }