src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp
changeset 47698 d4bfafe600d0
parent 47216 71c04702a3d5
child 48856 c866eaca24cb
--- a/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp	Wed Oct 25 16:15:10 2017 +0200
+++ b/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp	Wed Oct 25 16:30:31 2017 -0700
@@ -3168,14 +3168,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);