2711 assert(op->tmp1()->is_double_cpu(), "tmp1 must be allocated"); |
2711 assert(op->tmp1()->is_double_cpu(), "tmp1 must be allocated"); |
2712 Register tmp1 = op->tmp1()->as_register_lo(); |
2712 Register tmp1 = op->tmp1()->as_register_lo(); |
2713 metadata2reg(md->constant_encoding(), mdo); |
2713 metadata2reg(md->constant_encoding(), mdo); |
2714 |
2714 |
2715 Address counter_addr(mdo, md->byte_offset_of_slot(data, CounterData::count_offset())); |
2715 Address counter_addr(mdo, md->byte_offset_of_slot(data, CounterData::count_offset())); |
2716 Bytecodes::Code bc = method->java_code_at_bci(bci); |
|
2717 const bool callee_is_static = callee->is_loaded() && callee->is_static(); |
|
2718 // Perform additional virtual call profiling for invokevirtual and |
2716 // Perform additional virtual call profiling for invokevirtual and |
2719 // invokeinterface bytecodes. |
2717 // invokeinterface bytecodes |
2720 if ((bc == Bytecodes::_invokevirtual || bc == Bytecodes::_invokeinterface) && |
2718 if (op->should_profile_receiver_type()) { |
2721 !callee_is_static && // Required for optimized MH invokes. |
|
2722 C1ProfileVirtualCalls) { |
|
2723 assert(op->recv()->is_single_cpu(), "recv must be allocated"); |
2719 assert(op->recv()->is_single_cpu(), "recv must be allocated"); |
2724 Register recv = op->recv()->as_register(); |
2720 Register recv = op->recv()->as_register(); |
2725 assert_different_registers(mdo, tmp1, recv); |
2721 assert_different_registers(mdo, tmp1, recv); |
2726 assert(data->is_VirtualCallData(), "need VirtualCallData for virtual calls"); |
2722 assert(data->is_VirtualCallData(), "need VirtualCallData for virtual calls"); |
2727 ciKlass* known_klass = op->known_holder(); |
2723 ciKlass* known_klass = op->known_holder(); |