/* * Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
// 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 ist noch experimentell.