Mercurial > hg > graal-jvmci-8
changeset 16145:237508bd73b9
when Graal bootstrap is enabled (explicitly or implicitly), allocate same number of Graal compiler threads in -UseGraalCompilationQueue as in +UseGraalCompilationQueue
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 19 Jun 2014 23:41:46 +0200 |
parents | af9f3a5f091b |
children | 9b27e69f7cec |
files | src/share/vm/compiler/compileBroker.cpp |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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