changeset 19895:c3d9637c98ed

Add GraalHostThreads flag to overwrite the number of threads spawned for the baseline compiler.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 16 Mar 2015 21:49:59 +0100
parents e808c8324035
children 6dcbb4e05ce9
files src/share/vm/compiler/compileBroker.cpp src/share/vm/graal/graalGlobals.hpp
diffstat 2 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp	Sun Mar 15 16:22:37 2015 +0100
+++ b/src/share/vm/compiler/compileBroker.cpp	Mon Mar 16 21:49:59 2015 +0100
@@ -801,12 +801,6 @@
   GraalCompiler* graal = new GraalCompiler();
 #endif
 
-#ifdef COMPILER1
-  if (c1_count > 0) {
-    _compilers[0] = new Compiler();
-  }
-#endif // COMPILER1
-
 #if defined(COMPILERGRAAL)
   _compilers[1] = graal;
   if (FLAG_IS_DEFAULT(GraalThreads)) {
@@ -817,8 +811,18 @@
   } else {
     c2_count = GraalThreads;
   }
+  if (FLAG_IS_DEFAULT(GraalHostThreads)) {
+  } else {
+    c1_count = GraalHostThreads;
+  }
 #endif // COMPILERGRAAL
 
+#ifdef COMPILER1
+  if (c1_count > 0) {
+    _compilers[0] = new Compiler();
+  }
+#endif // COMPILER1
+
 #ifdef COMPILER2
   if (c2_count > 0) {
     _compilers[1] = new C2Compiler();
--- a/src/share/vm/graal/graalGlobals.hpp	Sun Mar 15 16:22:37 2015 +0100
+++ b/src/share/vm/graal/graalGlobals.hpp	Mon Mar 16 21:49:59 2015 +0100
@@ -61,6 +61,9 @@
   COMPILERGRAAL_PRESENT(product(intx, GraalThreads, 1,                      \
           "Force number of Graal compiler threads to use"))                 \
                                                                             \
+  COMPILERGRAAL_PRESENT(product(intx, GraalHostThreads, 1,                  \
+          "Force number of compiler threads for Graal host compiler"))      \
+                                                                            \
   GRAAL_ONLY(product(bool, CodeInstallSafepointChecks, true,                \
           "Perform explicit safepoint checks while installing code"))       \
                                                                             \