本文整理汇总了C++中methodHandle::method_data方法的典型用法代码示例。如果您正苦于以下问题:C++ methodHandle::method_data方法的具体用法?C++ methodHandle::method_data怎么用?C++ methodHandle::method_data使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类methodHandle
的用法示例。
在下文中一共展示了methodHandle::method_data方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: trace_frequency_counter_overflow
void NonTieredCompPolicy::trace_frequency_counter_overflow(methodHandle m, int branch_bci, int bci) {
if (TraceInvocationCounterOverflow) {
InvocationCounter* ic = m->invocation_counter();
InvocationCounter* bc = m->backedge_counter();
ResourceMark rm;
const char* msg =
bci == InvocationEntryBci
? "comp-policy cntr ovfl @ %d in entry of "
: "comp-policy cntr ovfl @ %d in loop of ";
tty->print(msg, bci);
m->print_value();
tty->cr();
ic->print();
bc->print();
if (ProfileInterpreter) {
if (bci != InvocationEntryBci) {
methodDataOop mdo = m->method_data();
if (mdo != NULL) {
int count = mdo->bci_to_data(branch_bci)->as_JumpData()->taken();
tty->print_cr("back branch count = %d", count);
}
}
}
}
}
示例2: trace_frequency_counter_overflow
void NonTieredCompPolicy::trace_frequency_counter_overflow(const methodHandle& m, int branch_bci, int bci) {
if (TraceInvocationCounterOverflow) {
MethodCounters* mcs = m->method_counters();
assert(mcs != NULL, "MethodCounters cannot be NULL for profiling");
InvocationCounter* ic = mcs->invocation_counter();
InvocationCounter* bc = mcs->backedge_counter();
ResourceMark rm;
if (bci == InvocationEntryBci) {
tty->print("comp-policy cntr ovfl @ %d in entry of ", bci);
} else {
tty->print("comp-policy cntr ovfl @ %d in loop of ", bci);
}
m->print_value();
tty->cr();
ic->print();
bc->print();
if (ProfileInterpreter) {
if (bci != InvocationEntryBci) {
MethodData* mdo = m->method_data();
if (mdo != NULL) {
int count = mdo->bci_to_data(branch_bci)->as_JumpData()->taken();
tty->print_cr("back branch count = %d", count);
}
}
}
}
}
示例3: create_mdo
// Create MDO if necessary.
void AdvancedThresholdPolicy::create_mdo(methodHandle mh, TRAPS) {
if (mh->is_native() || mh->is_abstract() || mh->is_accessor()) return;
if (mh->method_data() == NULL) {
methodOopDesc::build_interpreter_method_data(mh, THREAD);
if (HAS_PENDING_EXCEPTION) {
CLEAR_PENDING_EXCEPTION;
}
}
}
示例4: create_mdo
// Create MDO if necessary.
void AdvancedThresholdPolicy::create_mdo(methodHandle mh, JavaThread* THREAD) {
if (mh->is_native() ||
mh->is_abstract() ||
mh->is_accessor() ||
mh->is_constant_getter()) {
return;
}
if (mh->method_data() == NULL) {
Method::build_interpreter_method_data(mh, CHECK_AND_CLEAR);
}
}
示例5: 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());
}