comparison src/share/vm/opto/bytecodeInfo.cpp @ 3905:c26de9aef2ed

7071307: MethodHandle bimorphic inlining should consider the frequency Reviewed-by: twisti, roland, kvn, iveresov
author never
date Fri, 02 Sep 2011 20:58:21 -0700
parents a32de5085326
children f6f3bb0ee072
comparison
equal deleted inserted replaced
3902:11a4af030e4b 3905:c26de9aef2ed
139 ciMethodData* mdo = method()->method_data(); 139 ciMethodData* mdo = method()->method_data();
140 ciProfileData* mha_profile = mdo->bci_to_data(caller_bci); 140 ciProfileData* mha_profile = mdo->bci_to_data(caller_bci);
141 assert(mha_profile, "must exist"); 141 assert(mha_profile, "must exist");
142 CounterData* cd = mha_profile->as_CounterData(); 142 CounterData* cd = mha_profile->as_CounterData();
143 invoke_count = cd->count(); 143 invoke_count = cd->count();
144 call_site_count = invoke_count; // use the same value 144 if (invoke_count == 0) {
145 return "method handle not reached";
146 }
147
148 if (_caller_jvms != NULL && _caller_jvms->method() != NULL &&
149 _caller_jvms->method()->method_data() != NULL &&
150 !_caller_jvms->method()->method_data()->is_empty()) {
151 ciMethodData* mdo = _caller_jvms->method()->method_data();
152 ciProfileData* mha_profile = mdo->bci_to_data(_caller_jvms->bci());
153 assert(mha_profile, "must exist");
154 CounterData* cd = mha_profile->as_CounterData();
155 call_site_count = cd->count();
156 } else {
157 call_site_count = invoke_count; // use the same value
158 }
145 } 159 }
146 160
147 assert(invoke_count != 0, "require invocation count greater than zero"); 161 assert(invoke_count != 0, "require invocation count greater than zero");
148 int freq = call_site_count / invoke_count; 162 int freq = call_site_count / invoke_count;
149 163