diff -r c7f6875cc8c3 -r 279a5dd96f9b src/share/vm/opto/parse2.cpp --- a/src/share/vm/opto/parse2.cpp Tue Jul 25 15:30:54 2017 +0000 +++ b/src/share/vm/opto/parse2.cpp Thu Mar 09 14:27:21 2017 +0100 @@ -812,6 +812,9 @@ ciMethodData* methodData = method()->method_data(); if (!methodData->is_mature()) return PROB_UNKNOWN; ciProfileData* data = methodData->bci_to_data(bci()); + if (data == NULL) { + return PROB_UNKNOWN; + } if (!data->is_JumpData()) return PROB_UNKNOWN; // get taken and not taken values @@ -903,8 +906,8 @@ // of the OSR-ed method, and we want to deopt to gather more stats. // If you have ANY counts, then this loop is simply 'cold' relative // to the OSR loop. - if (data->as_BranchData()->taken() + - data->as_BranchData()->not_taken() == 0 ) { + if (data == NULL || + (data->as_BranchData()->taken() + data->as_BranchData()->not_taken() == 0)) { // This is the only way to return PROB_UNKNOWN: return PROB_UNKNOWN; }