本文整理汇总了C++中methodHandle::invocation_count方法的典型用法代码示例。如果您正苦于以下问题:C++ methodHandle::invocation_count方法的具体用法?C++ methodHandle::invocation_count怎么用?C++ methodHandle::invocation_count使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类methodHandle
的用法示例。
在下文中一共展示了methodHandle::invocation_count方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: method_invocation_event
void SimpleCompPolicy::method_invocation_event( methodHandle m, TRAPS) {
assert(UseCompiler || CompileTheWorld, "UseCompiler should be set by now.");
int hot_count = m->invocation_count();
reset_counter_for_invocation_event(m);
const char* comment = "count";
if (!delayCompilationDuringStartup() && canBeCompiled(m) && UseCompiler) {
nmethod* nm = m->code();
if (nm == NULL ) {
const char* comment = "count";
CompileBroker::compile_method(m, InvocationEntryBci,
m, hot_count, comment, CHECK);
} else {
#ifdef TIERED
if (nm->is_compiled_by_c1()) {
const char* comment = "tier1 overflow";
CompileBroker::compile_method(m, InvocationEntryBci,
m, hot_count, comment, CHECK);
}
#endif // TIERED
}
}
}
示例2: method_invocation_event
void SimpleCompPolicy::method_invocation_event(const methodHandle& m, JavaThread* thread) {
const int comp_level = CompLevel_highest_tier;
const int hot_count = m->invocation_count();
reset_counter_for_invocation_event(m);
const char* comment = "count";
if (is_compilation_enabled() && can_be_compiled(m, comp_level)) {
nmethod* nm = m->code();
if (nm == NULL ) {
CompileBroker::compile_method(m, InvocationEntryBci, comp_level, m, hot_count, comment, thread);
}
}
}
示例3: print_counters
void SimpleThresholdPolicy::print_counters(const char* prefix, methodHandle mh) {
int invocation_count = mh->invocation_count();
int backedge_count = mh->backedge_count();
MethodData* mdh = mh->method_data();
int mdo_invocations = 0, mdo_backedges = 0;
int mdo_invocations_start = 0, mdo_backedges_start = 0;
if (mdh != NULL) {
mdo_invocations = mdh->invocation_count();
mdo_backedges = mdh->backedge_count();
mdo_invocations_start = mdh->invocation_count_start();
mdo_backedges_start = mdh->backedge_count_start();
}
tty->print(" %stotal=%d,%d %smdo=%d(%d),%d(%d)", prefix,
invocation_count, backedge_count, prefix,
mdo_invocations, mdo_invocations_start,
mdo_backedges, mdo_backedges_start);
tty->print(" %smax levels=%d,%d", prefix,
mh->highest_comp_level(), mh->highest_osr_comp_level());
}
示例4: submit_compile
// Update the rate and submit compile
void AdvancedThresholdPolicy::submit_compile(methodHandle mh, int bci, CompLevel level, TRAPS) {
int hot_count = (bci == InvocationEntryBci) ? mh->invocation_count() : mh->backedge_count();
update_rate(os::javaTimeMillis(), mh());
CompileBroker::compile_method(mh, bci, level, mh, hot_count, "tiered", THREAD);
}