src/share/vm/runtime/advancedThresholdPolicy.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File tiered-osr-logic-fix Sdiff src/share/vm/runtime

src/share/vm/runtime/advancedThresholdPolicy.hpp

Print this page




 151  *   version in time. This reduces the overall transition to level 4 and decreases the startup time.
 152  *   Note that this behavior is also guarded by the Tier3Delay mechanism: when the c2 queue is too long
 153  *   these is not reason to start profiling prematurely.
 154  *
 155  * - TieredRateUpdateMinTime and TieredRateUpdateMaxTime are parameters of the rate computation.
 156  *   Basically, the rate is not computed more frequently than TieredRateUpdateMinTime and is considered
 157  *   to be zero if no events occurred in TieredRateUpdateMaxTime.
 158  */
 159 
 160 
 161 class AdvancedThresholdPolicy : public SimpleThresholdPolicy {
 162   jlong _start_time;
 163 
 164   // Call and loop predicates determine whether a transition to a higher compilation
 165   // level should be performed (pointers to predicate functions are passed to common().
 166   // Predicates also take compiler load into account.
 167   typedef bool (AdvancedThresholdPolicy::*Predicate)(int i, int b, CompLevel cur_level);
 168   bool call_predicate(int i, int b, CompLevel cur_level);
 169   bool loop_predicate(int i, int b, CompLevel cur_level);
 170   // Common transition function. Given a predicate determines if a method should transition to another level.
 171   CompLevel common(Predicate p, methodOop method, CompLevel cur_level);
 172   // Transition functions.
 173   // call_event determines if a method should be compiled at a different
 174   // level with a regular invocation entry.
 175   CompLevel call_event(methodOop method, CompLevel cur_level);
 176   // loop_event checks if a method should be OSR compiled at a different
 177   // level.
 178   CompLevel loop_event(methodOop method, CompLevel cur_level);
 179   // Has a method been long around?
 180   // We don't remove old methods from the compile queue even if they have
 181   // very low activity (see select_task()).
 182   inline bool is_old(methodOop method);
 183   // Was a given method inactive for a given number of milliseconds.
 184   // If it is, we would remove it from the queue (see select_task()).
 185   inline bool is_stale(jlong t, jlong timeout, methodOop m);
 186   // Compute the weight of the method for the compilation scheduling
 187   inline double weight(methodOop method);
 188   // Apply heuristics and return true if x should be compiled before y
 189   inline bool compare_methods(methodOop x, methodOop y);
 190   // Compute event rate for a given method. The rate is the number of event (invocations + backedges)
 191   // per millisecond.




 151  *   version in time. This reduces the overall transition to level 4 and decreases the startup time.
 152  *   Note that this behavior is also guarded by the Tier3Delay mechanism: when the c2 queue is too long
 153  *   these is not reason to start profiling prematurely.
 154  *
 155  * - TieredRateUpdateMinTime and TieredRateUpdateMaxTime are parameters of the rate computation.
 156  *   Basically, the rate is not computed more frequently than TieredRateUpdateMinTime and is considered
 157  *   to be zero if no events occurred in TieredRateUpdateMaxTime.
 158  */
 159 
 160 
 161 class AdvancedThresholdPolicy : public SimpleThresholdPolicy {
 162   jlong _start_time;
 163 
 164   // Call and loop predicates determine whether a transition to a higher compilation
 165   // level should be performed (pointers to predicate functions are passed to common().
 166   // Predicates also take compiler load into account.
 167   typedef bool (AdvancedThresholdPolicy::*Predicate)(int i, int b, CompLevel cur_level);
 168   bool call_predicate(int i, int b, CompLevel cur_level);
 169   bool loop_predicate(int i, int b, CompLevel cur_level);
 170   // Common transition function. Given a predicate determines if a method should transition to another level.
 171   CompLevel common(Predicate p, methodOop method, CompLevel cur_level, bool disable_feedback = false);
 172   // Transition functions.
 173   // call_event determines if a method should be compiled at a different
 174   // level with a regular invocation entry.
 175   CompLevel call_event(methodOop method, CompLevel cur_level);
 176   // loop_event checks if a method should be OSR compiled at a different
 177   // level.
 178   CompLevel loop_event(methodOop method, CompLevel cur_level);
 179   // Has a method been long around?
 180   // We don't remove old methods from the compile queue even if they have
 181   // very low activity (see select_task()).
 182   inline bool is_old(methodOop method);
 183   // Was a given method inactive for a given number of milliseconds.
 184   // If it is, we would remove it from the queue (see select_task()).
 185   inline bool is_stale(jlong t, jlong timeout, methodOop m);
 186   // Compute the weight of the method for the compilation scheduling
 187   inline double weight(methodOop method);
 188   // Apply heuristics and return true if x should be compiled before y
 189   inline bool compare_methods(methodOop x, methodOop y);
 190   // Compute event rate for a given method. The rate is the number of event (invocations + backedges)
 191   // per millisecond.


src/share/vm/runtime/advancedThresholdPolicy.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File