< prev index next >
src/hotspot/share/code/compiledIC.cpp
assert(nm->contains(ic_call), "must be in compiled method");
initialize_from_iter(iter);
}
! bool CompiledIC::set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecode, TRAPS) {
assert(CompiledICLocker::is_safe(_method), "mt unsafe call");
assert(!is_optimized(), "cannot set an optimized virtual call to megamorphic");
assert(is_call_to_compiled() || is_call_to_interpreted(), "going directly to megamorphic?");
address entry;
assert(nm->contains(ic_call), "must be in compiled method");
initialize_from_iter(iter);
}
! // This function may fail for two reasons: either due to running out of vtable
! // stubs, or due to running out of IC stubs in an attempted transition to a
! // transitional state. The needs_ic_stub_refill value will be set if the failure
! // was due to running out of IC stubs, in which case the caller will refill IC
! // stubs and retry.
! bool CompiledIC::set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecode,
! bool& needs_ic_stub_refill, TRAPS) {
assert(CompiledICLocker::is_safe(_method), "mt unsafe call");
assert(!is_optimized(), "cannot set an optimized virtual call to megamorphic");
assert(is_call_to_compiled() || is_call_to_interpreted(), "going directly to megamorphic?");
address entry;
***************
CompiledICHolder* holder = new CompiledICHolder(call_info->resolved_method()->method_holder(),
call_info->resolved_klass(), false);
holder->claim();
if (!InlineCacheBuffer::create_transition_stub(this, holder, entry)) {
delete holder;
+ needs_ic_stub_refill = true;
return false;
}
} else {
assert(call_info->call_kind() == CallInfo::vtable_call, "either itable or vtable");
// Can be different than selected_method->vtable_index(), due to package-private etc.
***************
entry = VtableStubs::find_vtable_stub(vtable_index);
if (entry == NULL) {
return false;
}
if (!InlineCacheBuffer::create_transition_stub(this, NULL, entry)) {
+ needs_ic_stub_refill = true;
return false;
}
}
if (TraceICs) {
< prev index next >