hotspot/src/share/vm/opto/parse2.cpp
changeset 44315 1e2f842b0c96
parent 37480 291ee208fb72
child 46542 73dd19b96b5d
equal deleted inserted replaced
44314:30ae899b9eca 44315:1e2f842b0c96
   824     // Use MethodData information if it is available
   824     // Use MethodData information if it is available
   825     // FIXME: free the ProfileData structure
   825     // FIXME: free the ProfileData structure
   826     ciMethodData* methodData = method()->method_data();
   826     ciMethodData* methodData = method()->method_data();
   827     if (!methodData->is_mature())  return PROB_UNKNOWN;
   827     if (!methodData->is_mature())  return PROB_UNKNOWN;
   828     ciProfileData* data = methodData->bci_to_data(bci());
   828     ciProfileData* data = methodData->bci_to_data(bci());
       
   829     if (data == NULL) {
       
   830       return PROB_UNKNOWN;
       
   831     }
   829     if (!data->is_JumpData())  return PROB_UNKNOWN;
   832     if (!data->is_JumpData())  return PROB_UNKNOWN;
   830 
   833 
   831     // get taken and not taken values
   834     // get taken and not taken values
   832     taken = data->as_JumpData()->taken();
   835     taken = data->as_JumpData()->taken();
   833     not_taken = 0;
   836     not_taken = 0;
   915         ciProfileData* data = methodData->bci_to_data(bci());
   918         ciProfileData* data = methodData->bci_to_data(bci());
   916         // Only stop for truly zero counts, which mean an unknown part
   919         // Only stop for truly zero counts, which mean an unknown part
   917         // of the OSR-ed method, and we want to deopt to gather more stats.
   920         // of the OSR-ed method, and we want to deopt to gather more stats.
   918         // If you have ANY counts, then this loop is simply 'cold' relative
   921         // If you have ANY counts, then this loop is simply 'cold' relative
   919         // to the OSR loop.
   922         // to the OSR loop.
   920         if (data->as_BranchData()->taken() +
   923         if (data == NULL ||
   921             data->as_BranchData()->not_taken() == 0 ) {
   924             (data->as_BranchData()->taken() +  data->as_BranchData()->not_taken() == 0)) {
   922           // This is the only way to return PROB_UNKNOWN:
   925           // This is the only way to return PROB_UNKNOWN:
   923           return PROB_UNKNOWN;
   926           return PROB_UNKNOWN;
   924         }
   927         }
   925       }
   928       }
   926     }
   929     }