changeset 11694:20d1eb098cd0

8159888: [JVMCI] the client VM build is broken when INCLUDE_JVMCI is defined Summary: fix Client VM build Reviewed-by: twisti, kvn
author dnsimon
date Tue, 05 Jul 2016 17:57:20 -0700
parents b82f3570b774
children 4be0cada20ad 9146e68921cc
files .mx.jvmci/mx_jvmci.py src/share/vm/compiler/oopMap.cpp src/share/vm/jvmci/jvmci_globals.cpp src/share/vm/jvmci/vmStructs_jvmci.cpp src/share/vm/utilities/globalDefinitions.hpp
diffstat 5 files changed, 22 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/.mx.jvmci/mx_jvmci.py	Tue Jul 05 07:57:09 2016 +0200
+++ b/.mx.jvmci/mx_jvmci.py	Tue Jul 05 17:57:20 2016 -0700
@@ -64,7 +64,7 @@
 _jdkDebugLevels = ['release', 'fastdebug', 'slowdebug']
 
 # TODO: add client once/if it can be built on 64-bit platforms
-_jdkJvmVariants = ['server']
+_jdkJvmVariants = ['server', 'client']
 
 """
 Translation table from mx_jvmci:8 --vmbuild values to mx_jvmci:9 --jdk-debug-level values.
--- a/src/share/vm/compiler/oopMap.cpp	Tue Jul 05 07:57:09 2016 +0200
+++ b/src/share/vm/compiler/oopMap.cpp	Tue Jul 05 17:57:20 2016 -0700
@@ -273,14 +273,9 @@
 static DoNothingClosure do_nothing;
 
 static void add_derived_oop(oop* base, oop* derived) {
-#ifndef TIERED
+#if !defined(TIERED) && !defined(INCLUDE_JVMCI)
   COMPILER1_PRESENT(ShouldNotReachHere();)
-#if INCLUDE_JVMCI
-  if (UseJVMCICompiler) {
-    ShouldNotReachHere();
-  }
-#endif
-#endif // TIERED
+#endif // !defined(TIERED) && !defined(INCLUDE_JVMCI)
 #if defined(COMPILER2) || INCLUDE_JVMCI
   DerivedPointerTable::add(derived, base);
 #endif // COMPILER2 || INCLUDE_JVMCI
@@ -473,13 +468,8 @@
 #ifndef PRODUCT
 
 bool ImmutableOopMap::has_derived_pointer() const {
-#ifndef TIERED
+#if !defined(TIERED) && !defined(INCLUDE_JVMCI)
   COMPILER1_PRESENT(return false);
-#if INCLUDE_JVMCI
-  if (UseJVMCICompiler) {
-    return false;
-  }
-#endif
 #endif // !TIERED
 #if defined(COMPILER2) || INCLUDE_JVMCI
   OopMapStream oms(this,OopMapValue::derived_oop_value);
--- a/src/share/vm/jvmci/jvmci_globals.cpp	Tue Jul 05 07:57:09 2016 +0200
+++ b/src/share/vm/jvmci/jvmci_globals.cpp	Tue Jul 05 17:57:20 2016 -0700
@@ -148,6 +148,22 @@
 #undef JVMCI_PRODUCT_FLAG_VALUE_CHANGED_CHECK_CODE
 #undef JVMCI_EXPERIMENTAL_FLAG_VALUE_CHANGED_CHECK_CODE
 
+#ifndef TIERED
+  // JVMCI is only usable as a jit compiler if the VM supports tiered compilation.
+#define JVMCI_CHECK_TIERED_ONLY_FLAG(FLAG)                         \
+  if (!FLAG_IS_DEFAULT(FLAG)) {                                   \
+    jio_fprintf(defaultStream::error_stream(), "VM option '%s' cannot be set in non-tiered VM\n", #FLAG); \
+    return false; \
+  }
+  JVMCI_CHECK_TIERED_ONLY_FLAG(UseJVMCICompiler)
+  JVMCI_CHECK_TIERED_ONLY_FLAG(BootstrapJVMCI)
+  JVMCI_CHECK_TIERED_ONLY_FLAG(PrintBootstrap)
+  JVMCI_CHECK_TIERED_ONLY_FLAG(JVMCIThreads)
+  JVMCI_CHECK_TIERED_ONLY_FLAG(JVMCIHostThreads)
+  JVMCI_CHECK_TIERED_ONLY_FLAG(JVMCICountersExcludeCompiler)
+#undef JVMCI_CHECK_TIERED_ONLY_FLAG
+#endif
+
   return true;
 }
 
--- a/src/share/vm/jvmci/vmStructs_jvmci.cpp	Tue Jul 05 07:57:09 2016 +0200
+++ b/src/share/vm/jvmci/vmStructs_jvmci.cpp	Tue Jul 05 17:57:20 2016 -0700
@@ -550,7 +550,7 @@
   declare_function(os::javaTimeNanos)                                     \
                                                                           \
   declare_function(Deoptimization::fetch_unroll_info)                     \
-  COMPILER2_PRESENT(declare_function(Deoptimization::uncommon_trap))      \
+  declare_function(Deoptimization::uncommon_trap)                         \
   declare_function(Deoptimization::unpack_frames)                         \
                                                                           \
   declare_function(JVMCIRuntime::new_instance) \
--- a/src/share/vm/utilities/globalDefinitions.hpp	Tue Jul 05 07:57:09 2016 +0200
+++ b/src/share/vm/utilities/globalDefinitions.hpp	Tue Jul 05 17:57:20 2016 -0700
@@ -951,7 +951,7 @@
   CompLevel_full_profile      = 3,         // C1, invocation & backedge counters + mdo
   CompLevel_full_optimization = 4,         // C2, Shark or JVMCI
 
-#if defined(COMPILER2) || defined(SHARK) || INCLUDE_JVMCI
+#if defined(COMPILER2) || defined(SHARK)
   CompLevel_highest_tier      = CompLevel_full_optimization,  // pure C2 and tiered or JVMCI and tiered
 #elif defined(COMPILER1)
   CompLevel_highest_tier      = CompLevel_simple,             // pure C1 or JVMCI