# HG changeset patch # User Doug Simon # Date 1403214106 -7200 # Node ID 237508bd73b9d12a3bf0039c0fa7f8950c61edf2 # Parent af9f3a5f091bec97ab75aeab8667c84ef11b8547 when Graal bootstrap is enabled (explicitly or implicitly), allocate same number of Graal compiler threads in -UseGraalCompilationQueue as in +UseGraalCompilationQueue diff -r af9f3a5f091b -r 237508bd73b9 src/share/vm/compiler/compileBroker.cpp --- a/src/share/vm/compiler/compileBroker.cpp Thu Jun 19 11:24:16 2014 +0200 +++ b/src/share/vm/compiler/compileBroker.cpp Thu Jun 19 23:41:46 2014 +0200 @@ -805,7 +805,19 @@ #if defined(COMPILERGRAAL) _compilers[1] = graal; - c2_count = UseGraalCompilationQueue ? 0 : FLAG_IS_DEFAULT(GraalThreads) ? c2_count : GraalThreads; + if (UseGraalCompilationQueue) { + c2_count = 0; + } else { + if (FLAG_IS_DEFAULT(GraalThreads)) { + if (!TieredCompilation && FLAG_IS_DEFAULT(BootstrapGraal) || BootstrapGraal) { + // Graal will bootstrap so give it the same number of threads + // as we would give the Java based compilation queue. + c2_count = os::active_processor_count(); + } + } else { + c2_count = GraalThreads; + } + } #endif // COMPILERGRAAL #ifdef COMPILER2