VM_Controller.methodSamples.setData(newCMID, newNumSamples);
VM_Controller.methodSamples.augmentData(newCMID, newNumSamples);
  private void recompile(VM_ControllerPlan plan) {    OPT_CompilationPlan cp = plan.getCompPlan();    plan.setTimeInitiated(VM_Controller.controllerClock);    if (VM.LogAOSEvents) VM_AOSLogging.recompilationStarted(cp);     if (cp.options.PRINT_METHOD) {      VM.sysWrite("-oc:O"+cp.options.getOptLevel()+" \n");    }        // Compile the method.    int newCMID = VM_RuntimeOptCompilerInfrastructure.recompileWithOpt(cp);    // transfer the samples from the old CMID to the new CMID.    // scale the number of samples down by the expected speedup     // in the newly compiled method.    int prevCMID = plan.getPrevCMID();    double expectedSpeedup = plan.getExpectedSpeedup();    double oldNumSamples = VM_Controller.methodSamples.getData(prevCMID);    double newNumSamples = oldNumSamples / expectedSpeedup;    VM_Controller.methodSamples.reset(prevCMID);    if (newCMID > -1) {      VM_Controller.methodSamples.setData(newCMID, newNumSamples);    }    // set the status of the plan accordingly    if (newCMID != -1) {      plan.setStatus(VM_ControllerPlan.COMPLETED);      VM_AdaptiveInlining.clearNonInlinedEdges(prevCMID);    } else {      plan.setStatus(VM_ControllerPlan.ABORTED_COMPILATION_ERROR);    }    plan.setCMID(newCMID);    plan.setTimeCompleted(VM_Controller.controllerClock);    if (VM.LogAOSEvents) {      if (newCMID == -1) {	VM_AOSLogging.recompilationAborted(cp);      } else {	VM_AOSLogging.recompilationCompleted(cp);      }    }  }