src/share/vm/opto/bytecodeInfo.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/bytecodeInfo.cpp	Tue Aug 30 18:43:09 2011
--- new/src/share/vm/opto/bytecodeInfo.cpp	Tue Aug 30 18:43:08 2011

*** 139,150 **** --- 139,164 ---- ciMethodData* mdo = method()->method_data(); ciProfileData* mha_profile = mdo->bci_to_data(caller_bci); assert(mha_profile, "must exist"); CounterData* cd = mha_profile->as_CounterData(); invoke_count = cd->count(); + if (invoke_count == 0) { + return "method handle not reached"; + } + + if (_caller_jvms != NULL && _caller_jvms->method() != NULL && + _caller_jvms->method()->method_data() != NULL && + !_caller_jvms->method()->method_data()->is_empty()) { + ciMethodData* mdo = _caller_jvms->method()->method_data(); + ciProfileData* mha_profile = mdo->bci_to_data(_caller_jvms->bci()); + assert(mha_profile, "must exist"); + CounterData* cd = mha_profile->as_CounterData(); + call_site_count = cd->count(); + } else { call_site_count = invoke_count; // use the same value } + } assert(invoke_count != 0, "require invocation count greater than zero"); int freq = call_site_count / invoke_count; // bump the max size if the call is frequent

src/share/vm/opto/bytecodeInfo.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File