// Set carry flags in the counters (in Method* and MDO). inlinestaticvoid handle_counter_overflow(const methodHandle& method); // Verify that a level is consistent with the compilation mode staticbool verify_level(CompLevel level); // Clamp the request level according to various constraints. inlinestatic CompLevel limit_level(CompLevel level); // Common transition function. Given a predicate determines if a method should transition to another level. template<typename Predicate> static CompLevel common(const methodHandle& method, CompLevel cur_level, bool disable_feedback = false); // Transition functions. // call_event determines if a method should be compiled at a different // level with a regular invocation entry. static CompLevel call_event(const methodHandle& method, CompLevel cur_level, Thread* thread); // loop_event checks if a method should be OSR compiled at a different // level. static CompLevel loop_event(const methodHandle& method, CompLevel cur_level, Thread* thread); staticvoid print_counters(constchar* prefix, const Method* m); // Has a method been long around? // We don't remove old methods from the compile queue even if they have // very low activity (see select_task()). inlinestaticbool is_old(const methodHandle& method); // Was a given method inactive for a given number of milliseconds. // If it is, we would remove it from the queue (see select_task()). inlinestaticbool is_stale(jlong t, jlong timeout, const methodHandle& method); // Compute the weight of the method for the compilation scheduling inlinestaticdouble weight(Method* method); // Apply heuristics and return true if x should be compiled before y inlinestaticbool compare_methods(Method* x, Method* y); // Compute event rate for a given method. The rate is the number of event (invocations + backedges) // per millisecond. inlinestaticvoid update_rate(jlong t, const methodHandle& method); // Compute threshold scaling coefficient inlinestaticdouble threshold_scale(CompLevel level, int feedback_k); // If a method is old enough and is still in the interpreter we would want to // start profiling without waiting for the compiled method to arrive. This function // determines whether we should do that. inlinestaticbool should_create_mdo(const methodHandle& method, CompLevel cur_level); // Create MDO if necessary. staticvoid create_mdo(const methodHandle& mh, JavaThread* THREAD); // Is method profiled enough? staticbool is_method_profiled(const methodHandle& method);
enum EventType { CALL, LOOP, COMPILE, REMOVE_FROM_QUEUE, UPDATE_IN_QUEUE, REPROFILE, MAKE_NOT_ENTRANT }; staticvoid print_event(EventType type, const Method* m, const Method* im, int bci, CompLevel level); // Check if the method can be compiled, change level if necessary staticvoid compile(const methodHandle& mh, int bci, CompLevel level, TRAPS); // Simple methods are as good being compiled with C1 as C2. // This function tells if it's such a function. inlinestaticbool is_trivial(const methodHandle& method); // Force method to be compiled at CompLevel_simple? inlinestaticbool force_comp_at_level_simple(const methodHandle& method);
// Get a compilation level for a given method. static CompLevel comp_level(Method* method); staticvoid method_invocation_event(const methodHandle& method, const methodHandle& inlinee,
CompLevel level, CompiledMethod* nm, TRAPS); staticvoid method_back_branch_event(const methodHandle& method, const methodHandle& inlinee, int bci, CompLevel level, CompiledMethod* nm, TRAPS);
// m must be compiled before executing it staticbool must_be_compiled(const methodHandle& m, int comp_level = CompLevel_any); public: staticint min_invocations() { return Tier4MinInvocationThreshold; } staticint c1_count() { return _c1_count; } staticint c2_count() { return _c2_count; } staticint compiler_count(CompLevel comp_level);
// If m must_be_compiled then request a compilation from the CompileBroker. // This supports the -Xcomp option. staticvoid compile_if_required(const methodHandle& m, TRAPS);
// m is allowed to be compiled staticbool can_be_compiled(const methodHandle& m, int comp_level = CompLevel_any); // m is allowed to be osr compiled staticbool can_be_osr_compiled(const methodHandle& m, int comp_level = CompLevel_any); staticbool is_compilation_enabled();
static CompileTask* select_task_helper(CompileQueue* compile_queue); // Return initial compile level to use with Xcomp (depends on compilation mode). staticvoid reprofile(ScopeDesc* trap_scope, bool is_osr); static nmethod* event(const methodHandle& method, const methodHandle& inlinee, int branch_bci, int bci, CompLevel comp_level, CompiledMethod* nm, TRAPS); // Select task is called by CompileBroker. We should return a task or NULL. static CompileTask* select_task(CompileQueue* compile_queue); // Tell the runtime if we think a given method is adequately profiled. staticbool is_mature(Method* method); // Initialize: set compiler thread count staticvoid initialize(); staticbool should_not_inline(ciEnv* env, ciMethod* callee);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.