< prev index next >

src/hotspot/share/opto/doCall.cpp

Print this page

  85     print_trace_type_profile(&ls, depth, prof_klass, site_count, receiver_count, true);
  86   }
  87 }
  88 
  89 CallGenerator* Compile::call_generator(ciMethod* callee, int vtable_index, bool call_does_dispatch,
  90                                        JVMState* jvms, bool allow_inline,
  91                                        float prof_factor, ciKlass* speculative_receiver_type,
  92                                        bool allow_intrinsics) {
  93   assert(callee != nullptr, "failed method resolution");
  94 
  95   ciMethod*       caller      = jvms->method();
  96   int             bci         = jvms->bci();
  97   Bytecodes::Code bytecode    = caller->java_code_at_bci(bci);
  98   ciMethod*       orig_callee = caller->get_method_at_bci(bci);
  99 
 100   const bool is_virtual_or_interface = (bytecode == Bytecodes::_invokevirtual) ||
 101                                        (bytecode == Bytecodes::_invokeinterface) ||
 102                                        (orig_callee->intrinsic_id() == vmIntrinsics::_linkToVirtual) ||
 103                                        (orig_callee->intrinsic_id() == vmIntrinsics::_linkToInterface);
 104 


 105   // Dtrace currently doesn't work unless all calls are vanilla
 106   if (env()->dtrace_method_probes()) {
 107     allow_inline = false;
 108   }
 109 
 110   // Note: When we get profiling during stage-1 compiles, we want to pull
 111   // from more specific profile data which pertains to this inlining.
 112   // Right now, ignore the information in jvms->caller(), and do method[bci].
 113   ciCallProfile profile = caller->call_profile_at_bci(bci);
 114 
 115   // See how many times this site has been invoked.
 116   int site_count = profile.count();
 117   int receiver_count = -1;
 118   if (call_does_dispatch && UseTypeProfile && profile.has_receiver(0)) {
 119     // Receivers in the profile structure are ordered by call counts
 120     // so that the most called (major) receiver is profile.receiver(0).
 121     receiver_count = profile.receiver_count(0);
 122   }
 123 
 124   CompileLog* log = this->log();

  85     print_trace_type_profile(&ls, depth, prof_klass, site_count, receiver_count, true);
  86   }
  87 }
  88 
  89 CallGenerator* Compile::call_generator(ciMethod* callee, int vtable_index, bool call_does_dispatch,
  90                                        JVMState* jvms, bool allow_inline,
  91                                        float prof_factor, ciKlass* speculative_receiver_type,
  92                                        bool allow_intrinsics) {
  93   assert(callee != nullptr, "failed method resolution");
  94 
  95   ciMethod*       caller      = jvms->method();
  96   int             bci         = jvms->bci();
  97   Bytecodes::Code bytecode    = caller->java_code_at_bci(bci);
  98   ciMethod*       orig_callee = caller->get_method_at_bci(bci);
  99 
 100   const bool is_virtual_or_interface = (bytecode == Bytecodes::_invokevirtual) ||
 101                                        (bytecode == Bytecodes::_invokeinterface) ||
 102                                        (orig_callee->intrinsic_id() == vmIntrinsics::_linkToVirtual) ||
 103                                        (orig_callee->intrinsic_id() == vmIntrinsics::_linkToInterface);
 104 
 105   callee->ensure_method_data(true);
 106 
 107   // Dtrace currently doesn't work unless all calls are vanilla
 108   if (env()->dtrace_method_probes()) {
 109     allow_inline = false;
 110   }
 111 
 112   // Note: When we get profiling during stage-1 compiles, we want to pull
 113   // from more specific profile data which pertains to this inlining.
 114   // Right now, ignore the information in jvms->caller(), and do method[bci].
 115   ciCallProfile profile = caller->call_profile_at_bci(bci);
 116 
 117   // See how many times this site has been invoked.
 118   int site_count = profile.count();
 119   int receiver_count = -1;
 120   if (call_does_dispatch && UseTypeProfile && profile.has_receiver(0)) {
 121     // Receivers in the profile structure are ordered by call counts
 122     // so that the most called (major) receiver is profile.receiver(0).
 123     receiver_count = profile.receiver_count(0);
 124   }
 125 
 126   CompileLog* log = this->log();
< prev index next >