diff src/share/vm/runtime/advancedThresholdPolicy.cpp @ 23404:3ef45d0a6d77

Remove jvmci VM configuration, and backport UseJVMCICompiler flag.
author Roland Schatz <roland.schatz@oracle.com>
date Tue, 24 May 2016 13:51:28 +0200
parents 24505bf61633
children
line wrap: on
line diff
--- a/src/share/vm/runtime/advancedThresholdPolicy.cpp	Fri May 20 15:49:00 2016 +0200
+++ b/src/share/vm/runtime/advancedThresholdPolicy.cpp	Tue May 24 13:51:28 2016 +0200
@@ -25,7 +25,7 @@
 #include "precompiled.hpp"
 #include "runtime/advancedThresholdPolicy.hpp"
 #include "runtime/simpleThresholdPolicy.inline.hpp"
-#ifdef COMPILERJVMCI
+#if INCLUDE_JVMCI
 #include "jvmci/jvmciRuntime.hpp"
 #endif
 
@@ -164,9 +164,7 @@
 
 // Called with the queue locked and with at least one element
 CompileTask* AdvancedThresholdPolicy::select_task(CompileQueue* compile_queue) {
-#ifdef COMPILERJVMCI
   CompileTask *max_blocking_task = NULL;
-#endif
   CompileTask *max_task = NULL;
   Method* max_method = NULL;
   jlong t = os::javaTimeMillis();
@@ -197,17 +195,14 @@
         max_method = method;
       }
     }
-#ifdef COMPILERJVMCI
     if (task->is_blocking()) {
       if (max_blocking_task == NULL || compare_methods(method, max_blocking_task->method())) {
         max_blocking_task = task;
       }
     }
-#endif
     task = next_task;
   }
 
-#ifdef COMPILERJVMCI
   if (max_blocking_task != NULL) {
     // In blocking compilation mode, the CompileBroker will make
     // compilations submitted by a JVMCI compiler thread non-blocking. These
@@ -217,7 +212,6 @@
     max_task = max_blocking_task;
     max_method = max_task->method();
   }
-#endif
 
   if (max_task->comp_level() == CompLevel_full_profile && TieredStopAtLevel > CompLevel_full_profile
       && is_method_profiled(max_method)) {
@@ -374,11 +368,14 @@
       if (common(p, method, CompLevel_full_profile, disable_feedback) == CompLevel_full_optimization) {
         next_level = CompLevel_full_optimization;
       } else if ((this->*p)(i, b, cur_level)) {
-#ifdef COMPILERJVMCI
-        // Since JVMCI takes a while to warm up, its queue inevitably backs up during
-        // early VM execution.
-        next_level = CompLevel_full_profile;
-#else
+#if INCLUDE_JVMCI
+        if (UseJVMCICompiler) {
+          // Since JVMCI takes a while to warm up, its queue inevitably backs up during
+          // early VM execution.
+          next_level = CompLevel_full_profile;
+          break;
+        }
+#endif
         // C1-generated fully profiled code is about 30% slower than the limited profile
         // code that has only invocation and backedge counters. The observation is that
         // if C2 queue is large enough we can spend too much time in the fully profiled code
@@ -392,7 +389,6 @@
         } else {
           next_level = CompLevel_full_profile;
         }
-#endif
       }
       break;
     case CompLevel_limited_profile:
@@ -453,7 +449,11 @@
   } else {
     next_level = MAX2(osr_level, next_level);
   }
-  COMPILERJVMCI_PRESENT(next_level = JVMCIRuntime::adjust_comp_level(method, false, next_level, thread);)
+#if INCLUDE_JVMCI
+  if (UseJVMCICompiler) {
+    next_level = JVMCIRuntime::adjust_comp_level(method, false, next_level, thread);
+  }
+#endif
   return next_level;
 }
 
@@ -468,7 +468,11 @@
       return osr_level;
     }
   }
-  COMPILERJVMCI_PRESENT(next_level = JVMCIRuntime::adjust_comp_level(method, true, next_level, thread);)
+#if INCLUDE_JVMCI
+  if (UseJVMCICompiler) {
+    next_level = JVMCIRuntime::adjust_comp_level(method, true, next_level, thread);
+  }
+#endif
   return next_level;
 }