src/share/vm/runtime/advancedThresholdPolicy.cpp

changeset 5151
91eba9f82325
parent 4936
aeaca88565e6
child 6649
7150b16fda52
     1.1 --- a/src/share/vm/runtime/advancedThresholdPolicy.cpp	Fri May 17 09:10:04 2013 -0700
     1.2 +++ b/src/share/vm/runtime/advancedThresholdPolicy.cpp	Thu May 16 15:46:49 2013 +0200
     1.3 @@ -68,7 +68,7 @@
     1.4    }
     1.5  #endif
     1.6  
     1.7 -
     1.8 +  set_increase_threshold_at_ratio();
     1.9    set_start_time(os::javaTimeMillis());
    1.10  }
    1.11  
    1.12 @@ -205,6 +205,17 @@
    1.13    double queue_size = CompileBroker::queue_size(level);
    1.14    int comp_count = compiler_count(level);
    1.15    double k = queue_size / (feedback_k * comp_count) + 1;
    1.16 +
    1.17 +  // Increase C1 compile threshold when the code cache is filled more
    1.18 +  // than specified by IncreaseFirstTierCompileThresholdAt percentage.
    1.19 +  // The main intention is to keep enough free space for C2 compiled code
    1.20 +  // to achieve peak performance if the code cache is under stress.
    1.21 +  if ((TieredStopAtLevel == CompLevel_full_optimization) && (level != CompLevel_full_optimization))  {
    1.22 +    double current_reverse_free_ratio = CodeCache::reverse_free_ratio();
    1.23 +    if (current_reverse_free_ratio > _increase_threshold_at_ratio) {
    1.24 +      k *= exp(current_reverse_free_ratio - _increase_threshold_at_ratio);
    1.25 +    }
    1.26 +  }
    1.27    return k;
    1.28  }
    1.29  

mercurial