< prev index next >

src/hotspot/share/runtime/sharedRuntime.cpp

Print this page

*** 1140,1158 **** // compiled frames. The receiver might be in a register. RegisterMap reg_map2(thread); frame stubFrame = thread->last_frame(); // Caller-frame is a compiled frame frame callerFrame = stubFrame.sender(&reg_map2); methodHandle callee = attached_method; if (callee.is_null()) { callee = bytecode.static_target(CHECK_NH); if (callee.is_null()) { THROW_(vmSymbols::java_lang_NoSuchMethodException(), nullHandle); } } ! if (callee->has_scalarized_args() && callee->method_holder()->is_value()) { // If the receiver is a value type that is passed as fields, no oop is available. // Resolve the call without receiver null checking. assert(!attached_method.is_null(), "must have attached method"); if (bc == Bytecodes::_invokevirtual) { LinkInfo link_info(attached_method->method_holder(), attached_method->name(), attached_method->signature()); --- 1140,1165 ---- // compiled frames. The receiver might be in a register. RegisterMap reg_map2(thread); frame stubFrame = thread->last_frame(); // Caller-frame is a compiled frame frame callerFrame = stubFrame.sender(&reg_map2); + bool caller_is_c1 = false; + + if (callerFrame.is_compiled_frame() && !callerFrame.is_deoptimized_frame()) { + address pc = callerFrame.pc(); + CompiledMethod* caller_nm = CodeCache::find_compiled(pc); + caller_is_c1 = caller_nm->is_compiled_by_c1(); + } methodHandle callee = attached_method; if (callee.is_null()) { callee = bytecode.static_target(CHECK_NH); if (callee.is_null()) { THROW_(vmSymbols::java_lang_NoSuchMethodException(), nullHandle); } } ! if (!caller_is_c1 && callee->has_scalarized_args() && callee->method_holder()->is_value()) { // If the receiver is a value type that is passed as fields, no oop is available. // Resolve the call without receiver null checking. assert(!attached_method.is_null(), "must have attached method"); if (bc == Bytecodes::_invokevirtual) { LinkInfo link_info(attached_method->method_holder(), attached_method->name(), attached_method->signature());
*** 1294,1304 **** #ifdef ASSERT address dest_entry_point = callee == NULL ? 0 : callee->entry_point(); // used below #endif bool is_nmethod = caller_nm->is_nmethod(); ! bool caller_is_c1 = caller_nm->is_c1(); if (is_virtual) { Klass* receiver_klass = NULL; if (ValueTypePassFieldsAsArgs && !caller_is_c1 && callee_method->method_holder()->is_value()) { // If the receiver is a value type that is passed as fields, no oop is available --- 1301,1311 ---- #ifdef ASSERT address dest_entry_point = callee == NULL ? 0 : callee->entry_point(); // used below #endif bool is_nmethod = caller_nm->is_nmethod(); ! bool caller_is_c1 = caller_nm->is_compiled_by_c1(); if (is_virtual) { Klass* receiver_klass = NULL; if (ValueTypePassFieldsAsArgs && !caller_is_c1 && callee_method->method_holder()->is_value()) { // If the receiver is a value type that is passed as fields, no oop is available
*** 1366,1376 **** frame caller_frame = thread->last_frame().sender(&cbl_map); CodeBlob* caller_cb = caller_frame.cb(); guarantee(caller_cb != NULL && caller_cb->is_compiled(), "must be called from compiled method"); CompiledMethod* caller_nm = caller_cb->as_compiled_method_or_null(); ! *caller_is_c1 = caller_nm->is_c1(); // make sure caller is not getting deoptimized // and removed before we are done with it. // CLEANUP - with lazy deopt shouldn't need this lock nmethodLocker caller_lock(caller_nm); --- 1373,1383 ---- frame caller_frame = thread->last_frame().sender(&cbl_map); CodeBlob* caller_cb = caller_frame.cb(); guarantee(caller_cb != NULL && caller_cb->is_compiled(), "must be called from compiled method"); CompiledMethod* caller_nm = caller_cb->as_compiled_method_or_null(); ! *caller_is_c1 = caller_nm->is_compiled_by_c1(); // make sure caller is not getting deoptimized // and removed before we are done with it. // CLEANUP - with lazy deopt shouldn't need this lock nmethodLocker caller_lock(caller_nm);
*** 1663,1673 **** Klass* receiver_klass = receiver()->klass(); inline_cache->compute_monomorphic_entry(callee_method, receiver_klass, inline_cache->is_optimized(), false, caller_nm->is_nmethod(), ! caller_nm->is_c1(), info, CHECK_false); if (!inline_cache->set_to_monomorphic(info)) { needs_ic_stub_refill = true; return false; } --- 1670,1680 ---- Klass* receiver_klass = receiver()->klass(); inline_cache->compute_monomorphic_entry(callee_method, receiver_klass, inline_cache->is_optimized(), false, caller_nm->is_nmethod(), ! caller_nm->is_compiled_by_c1(), info, CHECK_false); if (!inline_cache->set_to_monomorphic(info)) { needs_ic_stub_refill = true; return false; }
*** 1758,1768 **** // that refills them. RegisterMap reg_map(thread, false); frame caller_frame = thread->last_frame().sender(&reg_map); CodeBlob* cb = caller_frame.cb(); CompiledMethod* caller_nm = cb->as_compiled_method(); ! caller_is_c1 = caller_nm->is_c1(); for (;;) { ICRefillVerifier ic_refill_verifier; bool needs_ic_stub_refill = false; bool successful = handle_ic_miss_helper_internal(receiver, caller_nm, caller_frame, callee_method, --- 1765,1775 ---- // that refills them. RegisterMap reg_map(thread, false); frame caller_frame = thread->last_frame().sender(&reg_map); CodeBlob* cb = caller_frame.cb(); CompiledMethod* caller_nm = cb->as_compiled_method(); ! caller_is_c1 = caller_nm->is_compiled_by_c1(); for (;;) { ICRefillVerifier ic_refill_verifier; bool needs_ic_stub_refill = false; bool successful = handle_ic_miss_helper_internal(receiver, caller_nm, caller_frame, callee_method,
*** 1814,1824 **** address pc = caller.pc(); // Check for static or virtual call bool is_static_call = false; CompiledMethod* caller_nm = CodeCache::find_compiled(pc); ! caller_is_c1 = caller_nm->is_c1(); // Default call_addr is the location of the "basic" call. // Determine the address of the call we a reresolving. With // Inline Caches we will always find a recognizable call. // With Inline Caches disabled we may or may not find a --- 1821,1831 ---- address pc = caller.pc(); // Check for static or virtual call bool is_static_call = false; CompiledMethod* caller_nm = CodeCache::find_compiled(pc); ! caller_is_c1 = caller_nm->is_compiled_by_c1(); // Default call_addr is the location of the "basic" call. // Determine the address of the call we a reresolving. With // Inline Caches we will always find a recognizable call. // With Inline Caches disabled we may or may not find a
< prev index next >