src/hotspot/share/code/compiledIC.cpp

Print this page

        

*** 233,243 **** assert(index == itable_index, "CallInfo pre-computes this"); InstanceKlass* k = call_info->resolved_method()->method_holder(); assert(k->verify_itable_index(itable_index), "sanity check"); #endif //ASSERT CompiledICHolder* holder = new CompiledICHolder(call_info->resolved_method()->method_holder(), ! call_info->resolved_klass()); holder->claim(); InlineCacheBuffer::create_transition_stub(this, holder, entry); } 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. --- 233,243 ---- assert(index == itable_index, "CallInfo pre-computes this"); InstanceKlass* k = call_info->resolved_method()->method_holder(); assert(k->verify_itable_index(itable_index), "sanity check"); #endif //ASSERT CompiledICHolder* holder = new CompiledICHolder(call_info->resolved_method()->method_holder(), ! call_info->resolved_klass(), false); holder->claim(); InlineCacheBuffer::create_transition_stub(this, holder, entry); } 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.
*** 271,281 **** bool CompiledIC::is_megamorphic() const { assert(CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), ""); assert(!is_optimized(), "an optimized call cannot be megamorphic"); // Cannot rely on cached_value. It is either an interface or a method. ! return VtableStubs::is_entry_point(ic_destination()); } bool CompiledIC::is_call_to_compiled() const { assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), ""); --- 271,281 ---- bool CompiledIC::is_megamorphic() const { assert(CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), ""); assert(!is_optimized(), "an optimized call cannot be megamorphic"); // Cannot rely on cached_value. It is either an interface or a method. ! return VtableStubs::entry_point(ic_destination()) != NULL; } bool CompiledIC::is_call_to_compiled() const { assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
*** 523,535 **** CodeBlob* cb = CodeCache::find_blob_unsafe(entry); if (cb != NULL && cb->is_adapter_blob()) { return true; } // itable stubs also use CompiledICHolder ! if (VtableStubs::is_entry_point(entry) && VtableStubs::stub_containing(entry)->is_itable_stub()) { ! return true; } return false; } bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site, const CompiledMethod* cm) { // This call site might have become stale so inspect it carefully. --- 523,537 ---- CodeBlob* cb = CodeCache::find_blob_unsafe(entry); if (cb != NULL && cb->is_adapter_blob()) { return true; } // itable stubs also use CompiledICHolder ! if (cb != NULL && cb->is_vtable_blob()) { ! VtableStub* s = VtableStubs::entry_point(entry); ! return (s != NULL) && s->is_itable_stub(); } + return false; } bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site, const CompiledMethod* cm) { // This call site might have become stale so inspect it carefully.