本文整理汇总了C++中methodHandle::is_not_compilable方法的典型用法代码示例。如果您正苦于以下问题:C++ methodHandle::is_not_compilable方法的具体用法?C++ methodHandle::is_not_compilable怎么用?C++ methodHandle::is_not_compilable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类methodHandle
的用法示例。
在下文中一共展示了methodHandle::is_not_compilable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: can_be_compiled
// Returns true if m is allowed to be compiled
bool CompilationPolicy::can_be_compiled(methodHandle m, int comp_level) {
// allow any levels for WhiteBox
assert(WhiteBoxAPI || comp_level == CompLevel_all || is_compile(comp_level), "illegal compilation level");
if (m->is_abstract()) return false;
if (DontCompileHugeMethods && m->code_size() > HugeMethodLimit) return false;
// Math intrinsics should never be compiled as this can lead to
// monotonicity problems because the interpreter will prefer the
// compiled code to the intrinsic version. This can't happen in
// production because the invocation counter can't be incremented
// but we shouldn't expose the system to this problem in testing
// modes.
if (!AbstractInterpreter::can_be_compiled(m)) {
return false;
}
if (comp_level == CompLevel_all) {
if (TieredCompilation) {
// enough to be compilable at any level for tiered
return !m->is_not_compilable(CompLevel_simple) || !m->is_not_compilable(CompLevel_full_optimization);
} else {
// must be compilable at available level for non-tiered
return !m->is_not_compilable(CompLevel_highest_tier);
}
} else if (is_compile(comp_level)) {
return !m->is_not_compilable(comp_level);
}
return false;
}
示例2: can_be_compiled
// Returns true if m is allowed to be compiled
bool CompilationPolicy::can_be_compiled(methodHandle m, int comp_level) {
if (m->is_abstract()) return false;
if (DontCompileHugeMethods && m->code_size() > HugeMethodLimit) return false;
// Math intrinsics should never be compiled as this can lead to
// monotonicity problems because the interpreter will prefer the
// compiled code to the intrinsic version. This can't happen in
// production because the invocation counter can't be incremented
// but we shouldn't expose the system to this problem in testing
// modes.
if (!AbstractInterpreter::can_be_compiled(m)) {
return false;
}
if (comp_level == CompLevel_all) {
return !m->is_not_compilable(CompLevel_simple) && !m->is_not_compilable(CompLevel_full_optimization);
} else {
return !m->is_not_compilable(comp_level);
}
}
示例3: 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("]");
}
示例4: canBeCompiled
// Returns true if m is allowed to be compiled
bool CompilationPolicy::canBeCompiled(methodHandle m) {
if (m->is_abstract()) return false;
if (DontCompileHugeMethods && m->code_size() > HugeMethodLimit) return false;
return !m->is_not_compilable();
}