// CompileTask // // An entry in the compile queue. It represents a pending or current // compilation.
class CompileTask : public CHeapObj<mtCompiler> { friendclass VMStructs; friendclass JVMCIVMStructs;
public: // Different reasons for a compilation // The order is important - mapped to reason_names[] enum CompileReason {
Reason_None,
Reason_InvocationCount, // Simple/StackWalk-policy
Reason_BackedgeCount, // Simple/StackWalk-policy
Reason_Tiered, // Tiered-policy
Reason_Replay, // ciReplay
Reason_Whitebox, // Whitebox API
Reason_MustBeCompiled, // Used for -Xcomp or AlwaysCompileLoopMethods (see CompilationPolicy::must_be_compiled())
Reason_Bootstrap, // JVMCI bootstrap
Reason_Count
};
private: static CompileTask* _task_free_list;
Monitor* _lock;
uint _compile_id;
Method* _method;
jobject _method_holder; int _osr_bci; bool _is_complete; bool _is_success; bool _is_blocking;
CodeSection::csize_t _nm_content_size;
CodeSection::csize_t _nm_total_size;
CodeSection::csize_t _nm_insts_size;
DirectiveSet* _directive; #if INCLUDE_JVMCI bool _has_waiter; // Compilation state for a blocking JVMCI compilation
JVMCICompileState* _blocking_jvmci_compile_state; #endif int _comp_level; int _num_inlined_bytecodes;
CompileTask* _next, *_prev; bool _is_free; // Fields used for logging why the compilation was initiated:
jlong _time_queued; // time when task was enqueued
jlong _time_started; // time when compilation started
Method* _hot_method; // which method actually triggered this task
jobject _hot_method_holder; int _hot_count; // information about its invocation counter
CompileReason _compile_reason; // more info about the task constchar* _failure_reason; // Specifies if _failure_reason is on the C heap. bool _failure_reason_on_C_heap;
public:
CompileTask() : _failure_reason(NULL), _failure_reason_on_C_heap(false) { // May hold MethodCompileQueue_lock
_lock = new Monitor(Mutex::safepoint-1, "CompileTask_lock");
}
void initialize(int compile_id, const methodHandle& method, int osr_bci, int comp_level, const methodHandle& hot_method, int hot_count,
CompileTask::CompileReason compile_reason, bool is_blocking);
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.