VM.sysWrite("VM_OptMachineCodeMap: findGCMapIndex failed\n"); VM.sysWrite("Method: ");
if (instructionOffset < 0) { VM.sysWriteln("VM_OptGenericGCMapIterator.setupIterator called with negative instructionOffset", instructionOffset); } else { int possibleLen = cm.getInstructions().length << VM.LG_INSTRUCTION_WIDTH; if (possibleLen < instructionOffset) { VM.sysWriteln("VM_OptGenericGCMapIterator.setupIterator called with too big of an instructionOffset"); VM.sysWriteln("offset is", instructionOffset, " bytes of machine code for method ",possibleLen); } else { VM.sysWriteln("VM_OptGenericGCMapIterator.setupIterator called with apparently valid offset, but no GC map found!"); VM.sysWrite("Method: "); VM.sysWrite(compiledMethod.getMethod()); VM.sysWrite(", Machine Code (MC) Offset: "); VM.sysWriteln(instructionOffset); VM.sysFail("VM_OptGenericMapIterator: findGCMapIndex failed\n"); } } VM.sysWrite("Supposed method: ");
  public final void setupIterator(VM_CompiledMethod cm, 				  int instructionOffset, 				  VM_Address framePtr) {    if (DEBUG) {      VM.sysWrite("\n\t   ==========================\n");      VM.sysWrite("Reference map request made");      VM.sysWrite(" for machine code offset: ");      VM.sysWrite(instructionOffset);      VM.sysWrite("\n");      VM.sysWrite("\tframePtr: ");      VM.sysWrite(framePtr);      VM.sysWrite("\n");    }    reset();    // retrieve and save the corresponding VM_OptMachineCodeMap for    // this method and instructionOffset    compiledMethod = (VM_OptCompiledMethod)cm;    map = compiledMethod.getMCMap();    mapIndex = map.findGCMapIndex(instructionOffset);    if (mapIndex == VM_OptGCMap.ERROR) {      VM.sysWrite("VM_OptMachineCodeMap: findGCMapIndex failed\n");      VM.sysWrite("Method: ");      VM.sysWrite(compiledMethod.getMethod());      VM.sysWrite(", Machine Code (MC) Offset: ");      VM.sysWrite(instructionOffset);      VM.sysWrite("\n");      VM.sysFail("VM_OptGenericMapIterator: findGCMapIndex failed\n");    }    // save the frame pointer    this.framePtr = framePtr;    if (DEBUG) {      VM.sysWrite("\tMethod: ");      VM.sysWrite(compiledMethod.getMethod());      VM.sysWrite("\n ");      if (mapIndex == VM_OptGCMap.NO_MAP_ENTRY) {        VM.sysWrite("... empty map found\n");      } else {        VM.sysWrite("... found a map\n");      }      if (lookForMissedReferencesInSpills) {	VM.sysWrite("FramePtr: ");	VM.sysWrite(framePtr);	VM.sysWrite("\tFirst Spill: ");	VM.sysWrite(getFirstSpillLoc());	VM.sysWrite("\tLast Spill: ");	VM.sysWrite(getLastSpillLoc());	VM.sysWrite("\n");      }    }  }