# HG changeset patch # User Thomas Wuerthinger # Date 1426538999 -3600 # Node ID c3d9637c98ed87324b383eacfa6a3068bcf40c3b # Parent e808c83240358e023b8eb82345f75629bc37f4e1 Add GraalHostThreads flag to overwrite the number of threads spawned for the baseline compiler. diff -r e808c8324035 -r c3d9637c98ed src/share/vm/compiler/compileBroker.cpp --- 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(); diff -r e808c8324035 -r c3d9637c98ed src/share/vm/graal/graalGlobals.hpp --- 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")) \ \