1.1 --- a/src/share/vm/opto/parse2.cpp Tue Jul 25 15:30:54 2017 +0000 1.2 +++ b/src/share/vm/opto/parse2.cpp Thu Mar 09 14:27:21 2017 +0100 1.3 @@ -812,6 +812,9 @@ 1.4 ciMethodData* methodData = method()->method_data(); 1.5 if (!methodData->is_mature()) return PROB_UNKNOWN; 1.6 ciProfileData* data = methodData->bci_to_data(bci()); 1.7 + if (data == NULL) { 1.8 + return PROB_UNKNOWN; 1.9 + } 1.10 if (!data->is_JumpData()) return PROB_UNKNOWN; 1.11 1.12 // get taken and not taken values 1.13 @@ -903,8 +906,8 @@ 1.14 // of the OSR-ed method, and we want to deopt to gather more stats. 1.15 // If you have ANY counts, then this loop is simply 'cold' relative 1.16 // to the OSR loop. 1.17 - if (data->as_BranchData()->taken() + 1.18 - data->as_BranchData()->not_taken() == 0 ) { 1.19 + if (data == NULL || 1.20 + (data->as_BranchData()->taken() + data->as_BranchData()->not_taken() == 0)) { 1.21 // This is the only way to return PROB_UNKNOWN: 1.22 return PROB_UNKNOWN; 1.23 }