checkSampleSize(sampleNumber);
checkThresholdReached(sampleNumber);
  public final void update(int cmid, int callerCmid, int whereFrom) {    if (VM.UseEpilogueYieldPoints) {      // Use epilogue yieldpoints.  We increment one sample      // for every yieldpoint.  On a prologue, we count the caller.      // On backedges and epilogues, we count the current method.      if (whereFrom == VM_Thread.PROLOGUE) {	// Before getting a sample index, make sure we have something to insert	if (callerCmid != -1) {	  int sampleNumber = recordSample(callerCmid);	  checkSampleSize(sampleNumber);        } // nothing to insert      } else {         // loop backedge or epilogue.  	int sampleNumber = recordSample(cmid);	checkSampleSize(sampleNumber);      }    } else {      // Original scheme: No epilogue yieldpoints.  We increment two samples      // for every yieldpoint.  On a prologue, we count both the caller      // and callee.  On backedges, we count the current method twice.      if (whereFrom == VM_Thread.PROLOGUE) {        // Increment both for this method and the caller	int sampleNumber = recordSample(cmid);	if (callerCmid != -1) {	  sampleNumber = recordSample(callerCmid);	}	checkSampleSize(sampleNumber);      } else {         // loop backedge.  We're only called once, so need to take        // two samples to avoid penalizing methods with loops.	int sampleNumber = recordSample(cmid);	sampleNumber = recordSample(cmid);	checkSampleSize(sampleNumber);      }    }  }