// Translate a bci to its corresponding data, or NULL. ciProfileData* ciMethodData::bci_to_data(int bci, ciMethod* m) { // If m is not NULL we look for a SpeculativeTrapData entry if (m == NULL) { ciProfileData* data = data_before(bci); for ( ; is_valid(data); data = next_data(data)) { if (data->bci() == bci) { set_hint_di(dp_to_di(data->dp())); return data; } else if (data->bci() > bci) { break; } } } bool two_free_slots = false; ciProfileData* result = bci_to_extra_data(bci, m, two_free_slots); if (result != NULL) { return result; } if (m != NULL && !two_free_slots) { // We were looking for a SpeculativeTrapData entry we didn't // find. Room is not available for more SpeculativeTrapData // entries, look in the non SpeculativeTrapData entries. return bci_to_data(bci, NULL); } return NULL; }
// Translate a bci to its corresponding data, or NULL. ProfileData* methodDataOopDesc::bci_to_data(int bci) { ProfileData* data = data_before(bci); for ( ; is_valid(data); data = next_data(data)) { if (data->bci() == bci) { set_hint_di(dp_to_di(data->dp())); return data; } else if (data->bci() > bci) { break; } } return bci_to_extra_data(bci, false); }