// 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; }
int trap_recompiled_at(int bci) { return trap_recompiled_at(bci_to_data(bci)); }
int has_trap_at(int bci, int reason) { return has_trap_at(bci_to_data(bci), reason); }