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