8029436: CICompilerCount is not updated when the number of compiler threads is adjusted to the number of CPUs

Mon, 14 Apr 2014 08:24:28 +0200

author
anoll
date
Mon, 14 Apr 2014 08:24:28 +0200
changeset 6649
7150b16fda52
parent 6648
4e03f6196358
child 6650
798f5b02be89

8029436: CICompilerCount is not updated when the number of compiler threads is adjusted to the number of CPUs
Summary: CICompilerCount is updated in AdvancedThresholdPolicy::initialize, SimpleThresholdPolicy::initialize and NonTieredCompPolicy::initialize. A warning is printed if the usersets both, CICompilerCount and CICompilerCountPerCPU.
Reviewed-by: kvn, twisti
Contributed-by: Tobias Hartmann <tobias.hartmann@oracle.com>

src/share/vm/runtime/advancedThresholdPolicy.cpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/arguments.cpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/compilationPolicy.cpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/simpleThresholdPolicy.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/runtime/advancedThresholdPolicy.cpp	Fri Apr 25 09:22:42 2014 -0700
     1.2 +++ b/src/share/vm/runtime/advancedThresholdPolicy.cpp	Mon Apr 14 08:24:28 2014 +0200
     1.3 @@ -53,7 +53,8 @@
     1.4    }
     1.5  
     1.6    set_c1_count(MAX2(count / 3, 1));
     1.7 -  set_c2_count(MAX2(count - count / 3, 1));
     1.8 +  set_c2_count(MAX2(count - c1_count(), 1));
     1.9 +  FLAG_SET_ERGO(intx, CICompilerCount, c1_count() + c2_count());
    1.10  
    1.11    // Some inlining tuning
    1.12  #ifdef X86
     2.1 --- a/src/share/vm/runtime/arguments.cpp	Fri Apr 25 09:22:42 2014 -0700
     2.2 +++ b/src/share/vm/runtime/arguments.cpp	Mon Apr 14 08:24:28 2014 +0200
     2.3 @@ -2383,6 +2383,10 @@
     2.4    status &= verify_interval(NmethodSweepFraction, 1, ReservedCodeCacheSize/K, "NmethodSweepFraction");
     2.5    status &= verify_interval(NmethodSweepActivity, 0, 2000, "NmethodSweepActivity");
     2.6  
     2.7 +  if (!FLAG_IS_DEFAULT(CICompilerCount) && !FLAG_IS_DEFAULT(CICompilerCountPerCPU) && CICompilerCountPerCPU) {
     2.8 +    warning("The VM option CICompilerCountPerCPU overrides CICompilerCount.");
     2.9 +  }
    2.10 +
    2.11    return status;
    2.12  }
    2.13  
     3.1 --- a/src/share/vm/runtime/compilationPolicy.cpp	Fri Apr 25 09:22:42 2014 -0700
     3.2 +++ b/src/share/vm/runtime/compilationPolicy.cpp	Mon Apr 14 08:24:28 2014 +0200
     3.3 @@ -182,6 +182,7 @@
     3.4      // max(log2(8)-1,1) = 2 compiler threads on an 8-way machine.
     3.5      // May help big-app startup time.
     3.6      _compiler_count = MAX2(log2_intptr(os::active_processor_count())-1,1);
     3.7 +    FLAG_SET_ERGO(intx, CICompilerCount, _compiler_count);
     3.8    } else {
     3.9      _compiler_count = CICompilerCount;
    3.10    }
     4.1 --- a/src/share/vm/runtime/simpleThresholdPolicy.cpp	Fri Apr 25 09:22:42 2014 -0700
     4.2 +++ b/src/share/vm/runtime/simpleThresholdPolicy.cpp	Mon Apr 14 08:24:28 2014 +0200
     4.3 @@ -142,7 +142,8 @@
     4.4      count = MAX2(log2_intptr(os::active_processor_count()), 1) * 3 / 2;
     4.5    }
     4.6    set_c1_count(MAX2(count / 3, 1));
     4.7 -  set_c2_count(MAX2(count - count / 3, 1));
     4.8 +  set_c2_count(MAX2(count - c1_count(), 1));
     4.9 +  FLAG_SET_ERGO(intx, CICompilerCount, c1_count() + c2_count());
    4.10  }
    4.11  
    4.12  void SimpleThresholdPolicy::set_carry_if_necessary(InvocationCounter *counter) {

mercurial