comparison src/share/vm/compiler/compileBroker.cpp @ 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 98592ae4b1fa
children 5119e7f07d93
comparison
equal deleted inserted replaced
19869:e808c8324035 19895:c3d9637c98ed
799 int c2_count = CompilationPolicy::policy()->compiler_count(CompLevel_full_optimization); 799 int c2_count = CompilationPolicy::policy()->compiler_count(CompLevel_full_optimization);
800 #ifdef GRAAL 800 #ifdef GRAAL
801 GraalCompiler* graal = new GraalCompiler(); 801 GraalCompiler* graal = new GraalCompiler();
802 #endif 802 #endif
803 803
804 #ifdef COMPILER1
805 if (c1_count > 0) {
806 _compilers[0] = new Compiler();
807 }
808 #endif // COMPILER1
809
810 #if defined(COMPILERGRAAL) 804 #if defined(COMPILERGRAAL)
811 _compilers[1] = graal; 805 _compilers[1] = graal;
812 if (FLAG_IS_DEFAULT(GraalThreads)) { 806 if (FLAG_IS_DEFAULT(GraalThreads)) {
813 if (!TieredCompilation && FLAG_IS_DEFAULT(BootstrapGraal) || BootstrapGraal) { 807 if (!TieredCompilation && FLAG_IS_DEFAULT(BootstrapGraal) || BootstrapGraal) {
814 // Graal will bootstrap so give it more threads 808 // Graal will bootstrap so give it more threads
815 c2_count = MIN2(32, os::active_processor_count()); 809 c2_count = MIN2(32, os::active_processor_count());
816 } 810 }
817 } else { 811 } else {
818 c2_count = GraalThreads; 812 c2_count = GraalThreads;
819 } 813 }
814 if (FLAG_IS_DEFAULT(GraalHostThreads)) {
815 } else {
816 c1_count = GraalHostThreads;
817 }
820 #endif // COMPILERGRAAL 818 #endif // COMPILERGRAAL
819
820 #ifdef COMPILER1
821 if (c1_count > 0) {
822 _compilers[0] = new Compiler();
823 }
824 #endif // COMPILER1
821 825
822 #ifdef COMPILER2 826 #ifdef COMPILER2
823 if (c2_count > 0) { 827 if (c2_count > 0) {
824 _compilers[1] = new C2Compiler(); 828 _compilers[1] = new C2Compiler();
825 } 829 }