64 65 CallGenerator* Compile::call_generator(ciMethod* callee, int vtable_index, bool call_does_dispatch, 66 JVMState* jvms, bool allow_inline, 67 float prof_factor, ciKlass* speculative_receiver_type, 68 bool allow_intrinsics, bool delayed_forbidden) { 69 ciMethod* caller = jvms->method(); 70 int bci = jvms->bci(); 71 Bytecodes::Code bytecode = caller->java_code_at_bci(bci); 72 guarantee(callee != NULL, "failed method resolution"); 73 74 // Dtrace currently doesn't work unless all calls are vanilla 75 if (env()->dtrace_method_probes()) { 76 allow_inline = false; 77 } 78 79 // Note: When we get profiling during stage-1 compiles, we want to pull 80 // from more specific profile data which pertains to this inlining. 81 // Right now, ignore the information in jvms->caller(), and do method[bci]. 82 ciCallProfile profile = caller->call_profile_at_bci(bci); 83 84 // See how many times this site has been invoked. 85 int site_count = profile.count(); 86 int receiver_count = -1; 87 if (call_does_dispatch && UseTypeProfile && profile.has_receiver(0)) { 88 // Receivers in the profile structure are ordered by call counts 89 // so that the most called (major) receiver is profile.receiver(0). 90 receiver_count = profile.receiver_count(0); 91 } 92 93 CompileLog* log = this->log(); 94 if (log != NULL) { 95 int rid = (receiver_count >= 0)? log->identify(profile.receiver(0)): -1; 96 int r2id = (rid != -1 && profile.has_receiver(1))? log->identify(profile.receiver(1)):-1; 97 log->begin_elem("call method='%d' count='%d' prof_factor='%f'", 98 log->identify(callee), site_count, prof_factor); 99 if (call_does_dispatch) log->print(" virtual='1'"); 100 if (allow_inline) log->print(" inline='1'"); 101 if (receiver_count >= 0) { 102 log->print(" receiver='%d' receiver_count='%d'", rid, receiver_count); 103 if (profile.has_receiver(1)) { | 64 65 CallGenerator* Compile::call_generator(ciMethod* callee, int vtable_index, bool call_does_dispatch, 66 JVMState* jvms, bool allow_inline, 67 float prof_factor, ciKlass* speculative_receiver_type, 68 bool allow_intrinsics, bool delayed_forbidden) { 69 ciMethod* caller = jvms->method(); 70 int bci = jvms->bci(); 71 Bytecodes::Code bytecode = caller->java_code_at_bci(bci); 72 guarantee(callee != NULL, "failed method resolution"); 73 74 // Dtrace currently doesn't work unless all calls are vanilla 75 if (env()->dtrace_method_probes()) { 76 allow_inline = false; 77 } 78 79 // Note: When we get profiling during stage-1 compiles, we want to pull 80 // from more specific profile data which pertains to this inlining. 81 // Right now, ignore the information in jvms->caller(), and do method[bci]. 82 ciCallProfile profile = caller->call_profile_at_bci(bci); 83 84 #ifndef _LP64 85 // Check and handle overflow condition 86 if (profile.count() < -1) { 87 profile.set_count(max_jint); 88 } 89 #endif 90 // See how many times this site has been invoked. 91 int site_count = profile.count(); 92 int receiver_count = -1; 93 if (call_does_dispatch && UseTypeProfile && profile.has_receiver(0)) { 94 // Receivers in the profile structure are ordered by call counts 95 // so that the most called (major) receiver is profile.receiver(0). 96 receiver_count = profile.receiver_count(0); 97 } 98 99 CompileLog* log = this->log(); 100 if (log != NULL) { 101 int rid = (receiver_count >= 0)? log->identify(profile.receiver(0)): -1; 102 int r2id = (rid != -1 && profile.has_receiver(1))? log->identify(profile.receiver(1)):-1; 103 log->begin_elem("call method='%d' count='%d' prof_factor='%f'", 104 log->identify(callee), site_count, prof_factor); 105 if (call_does_dispatch) log->print(" virtual='1'"); 106 if (allow_inline) log->print(" inline='1'"); 107 if (receiver_count >= 0) { 108 log->print(" receiver='%d' receiver_count='%d'", rid, receiver_count); 109 if (profile.has_receiver(1)) { |