本文整理汇总了C++中methodHandle::is_not_osr_compilable方法的典型用法代码示例。如果您正苦于以下问题:C++ methodHandle::is_not_osr_compilable方法的具体用法?C++ methodHandle::is_not_osr_compilable怎么用?C++ methodHandle::is_not_osr_compilable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类methodHandle
的用法示例。
在下文中一共展示了methodHandle::is_not_osr_compilable方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: can_be_osr_compiled
// Returns true if m is allowed to be osr compiled
bool CompilationPolicy::can_be_osr_compiled(methodHandle m, int comp_level) {
bool result = false;
if (comp_level == CompLevel_all) {
if (TieredCompilation) {
// enough to be osr compilable at any level for tiered
result = !m->is_not_osr_compilable(CompLevel_simple) || !m->is_not_osr_compilable(CompLevel_full_optimization);
} else {
// must be osr compilable at available level for non-tiered
result = !m->is_not_osr_compilable(CompLevel_highest_tier);
}
} else if (is_compile(comp_level)) {
result = !m->is_not_osr_compilable(comp_level);
}
return (result && can_be_compiled(m, comp_level));
}
示例2: compile
// Check if the method can be compiled, change level if necessary
void SimpleThresholdPolicy::compile(methodHandle mh, int bci, CompLevel level, JavaThread* thread) {
assert(level <= TieredStopAtLevel, "Invalid compilation level");
if (level == CompLevel_none) {
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);
}
}
示例3: method_back_branch_event
void SimpleCompPolicy::method_back_branch_event(methodHandle m, int bci, JavaThread* thread) {
int hot_count = m->backedge_count();
const char* comment = "backedge_count";
if (is_compilation_enabled() && !m->is_not_osr_compilable() && can_be_compiled(m)) {
CompileBroker::compile_method(m, bci, CompLevel_highest_tier,
m, hot_count, comment, thread);
NOT_PRODUCT(trace_osr_completion(m->lookup_osr_nmethod_for(bci, CompLevel_highest_tier, true));)
}
示例4: method_back_branch_event
void SimpleCompPolicy::method_back_branch_event(methodHandle m, int branch_bci, int loop_top_bci, TRAPS) {
assert(UseCompiler || CompileTheWorld, "UseCompiler should be set by now.");
int hot_count = m->backedge_count();
const char* comment = "backedge_count";
if (!m->is_not_osr_compilable() && !delayCompilationDuringStartup() && canBeCompiled(m)) {
CompileBroker::compile_method(m, loop_top_bci, m, hot_count, comment, CHECK);
NOT_PRODUCT(trace_osr_completion(m->lookup_osr_nmethod_for(loop_top_bci));)
}
示例5: print_event
// Print an event.
void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodHandle imh,
int bci, CompLevel level) {
bool inlinee_event = mh() != imh();
ttyLocker tty_lock;
tty->print("%lf: [", os::elapsedTime());
switch(type) {
case CALL:
tty->print("call");
break;
case LOOP:
tty->print("loop");
break;
case COMPILE:
tty->print("compile");
break;
case REMOVE_FROM_QUEUE:
tty->print("remove-from-queue");
break;
case UPDATE_IN_QUEUE:
tty->print("update-in-queue");
break;
case REPROFILE:
tty->print("reprofile");
break;
case MAKE_NOT_ENTRANT:
tty->print("make-not-entrant");
break;
default:
tty->print("unknown");
}
tty->print(" level=%d ", level);
ResourceMark rm;
char *method_name = mh->name_and_sig_as_C_string();
tty->print("[%s", method_name);
if (inlinee_event) {
char *inlinee_name = imh->name_and_sig_as_C_string();
tty->print(" [%s]] ", inlinee_name);
}
else tty->print("] ");
tty->print("@%d queues=%d,%d", bci, CompileBroker::queue_size(CompLevel_full_profile),
CompileBroker::queue_size(CompLevel_full_optimization));
print_specific(type, mh, imh, bci, level);
if (type != COMPILE) {
print_counters("", mh);
if (inlinee_event) {
print_counters("inlinee ", imh);
}
tty->print(" compilable=");
bool need_comma = false;
if (!mh->is_not_compilable(CompLevel_full_profile)) {
tty->print("c1");
need_comma = true;
}
if (!mh->is_not_osr_compilable(CompLevel_full_profile)) {
if (need_comma) tty->print(",");
tty->print("c1-osr");
need_comma = true;
}
if (!mh->is_not_compilable(CompLevel_full_optimization)) {
if (need_comma) tty->print(",");
tty->print("c2");
need_comma = true;
}
if (!mh->is_not_osr_compilable(CompLevel_full_optimization)) {
if (need_comma) tty->print(",");
tty->print("c2-osr");
}
tty->print(" status=");
if (mh->queued_for_compilation()) {
tty->print("in-queue");
} else tty->print("idle");
}
tty->print_cr("]");
}