本文整理汇总了C++中methodHandle::aot_code方法的典型用法代码示例。如果您正苦于以下问题:C++ methodHandle::aot_code方法的具体用法?C++ methodHandle::aot_code怎么用?C++ methodHandle::aot_code使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类methodHandle
的用法示例。
在下文中一共展示了methodHandle::aot_code方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: compile
// Check if the method can be compiled, change level if necessary
void SimpleThresholdPolicy::compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread) {
assert(level <= TieredStopAtLevel, "Invalid compilation level");
if (level == CompLevel_none) {
return;
}
if (level == CompLevel_aot) {
if (mh->has_aot_code()) {
if (PrintTieredEvents) {
print_event(COMPILE, mh, mh, bci, level);
}
MutexLocker ml(Compile_lock);
NoSafepointVerifier nsv;
if (mh->has_aot_code() && mh->code() != mh->aot_code()) {
mh->aot_code()->make_entrant();
if (mh->has_compiled_code()) {
mh->code()->make_not_entrant();
}
Method::set_code(mh, mh->aot_code());
}
}
return;
}
// Check if the method can be compiled. If it cannot be compiled with C1, continue profiling
// in the interpreter and then compile with C2 (the transition function will request that,
// see common() ). If the method cannot be compiled with C2 but still can with C1, compile it with
// pure C1.
if (!can_be_compiled(mh, level)) {
if (level == CompLevel_full_optimization && can_be_compiled(mh, CompLevel_simple)) {
compile(mh, bci, CompLevel_simple, thread);
}
return;
}
if (bci != InvocationEntryBci && mh->is_not_osr_compilable(level)) {
return;
}
if (!CompileBroker::compilation_is_in_queue(mh)) {
if (PrintTieredEvents) {
print_event(COMPILE, mh, mh, bci, level);
}
submit_compile(mh, bci, level, thread);
}
}