--- old/src/hotspot/cpu/sparc/c1_LIRAssembler_sparc.cpp 2017-10-25 15:12:01.000000000 -0700 +++ new/src/hotspot/cpu/sparc/c1_LIRAssembler_sparc.cpp 2017-10-25 15:12:01.000000000 -0700 @@ -2763,13 +2763,9 @@ } Address counter_addr(mdo, md->byte_offset_of_slot(data, CounterData::count_offset()) - mdo_offset_bias); - Bytecodes::Code bc = method->java_code_at_bci(bci); - const bool callee_is_static = callee->is_loaded() && callee->is_static(); // Perform additional virtual call profiling for invokevirtual and // invokeinterface bytecodes - if ((bc == Bytecodes::_invokevirtual || bc == Bytecodes::_invokeinterface) && - !callee_is_static && // required for optimized MH invokes - C1ProfileVirtualCalls) { + if (op->should_profile_receiver_type()) { assert(op->recv()->is_single_cpu(), "recv must be allocated"); Register recv = op->recv()->as_register(); assert_different_registers(mdo, tmp1, recv);