field = findVMField("VM_BootRecord", "freeAddress");
field = findVMField("VM_BootRecord", "bootImageEnd");
  public void fillBootMethodTable() {    try {      // while we are at this, cache a few offset values that will be used often      // (OK to cache since they are static and will stay in the TOC)      VM_Field field = findVMField("VM_TypeDictionary", "values");      VM_TypeDictionary_values_offset = field.getOffset();      field = findVMField("VM_MethodDictionary", "values");      VM_MethodDictionary_values_offset = field.getOffset();      field = findVMField("VM_Class", "declaredMethods");            VM_Class_declaredMethods_offset = field.getOffset();      field = findVMField("VM_CompiledMethods", "compiledMethods");      compiledMethodTable_offset = field.getOffset();      field = findVMField("VM_CompiledMethod", "instructions");      compiledMethod_instructions_offset = field.getOffset();      field = findVMField("VM_CompiledMethod", "method");      compiledMethod_method_offset = field.getOffset();      // first get the address for the method array      int methodArrayAddress = owner.mem.readTOC(compiledMethodTable_offset);      // get the number of compiled methods when booting is done      field = findVMField("VM_CompiledMethods", "currentCompiledMethodId");      int methodArraySize = owner.mem.readTOC(field.getOffset()) + 1;      System.out.println("There are " + methodArraySize + 			 " compiled methods in the boot image.");      // allocate the address arrays      startAddress = new int[methodArraySize];      endAddress = new int[methodArraySize];      // the first entry is null      startAddress[0] = -1;           endAddress[0] = -1;      // fill the rest of the table      for (int i=1; i<methodArraySize; i++) { 	int compiledMethodAddress = owner.mem.read(methodArrayAddress + i*4);	if (compiledMethodAddress==0)    // can be null with opt compiler	  continue;	startAddress[i] = owner.mem.read(compiledMethodAddress + compiledMethod_instructions_offset);	if (startAddress[i]==0) {	  // some 150 entries will be native or else and have no instructions	  endAddress[i] = 0;	} else {	  int codeSize = owner.mem.read(startAddress[i] + VM_ObjectModel.getArrayLengthOffset());	  // For AIX, code is word size (4 bytes), for Lintel, code is byte size	  // endAddress[i] = startAddress[i] + codeSize*4;	  endAddress[i] = startAddress[i] + codeSize;	}      }      System.out.println("Done filling address table");       // now get the address range of the boot image      field = findVMField("VM_BootRecord", "the_boot_record");      int bootRecordAddress = owner.mem.readTOC(field.getOffset());      field = findVMField("VM_BootRecord", "startAddress");      bootStart = owner.mem.read(bootRecordAddress + field.getOffset());       field = findVMField("VM_BootRecord", "freeAddress");      bootEnd = owner.mem.read(bootRecordAddress + field.getOffset());      System.out.println("Method table: " + methodArraySize + " entries, boot address " +			 Integer.toHexString(bootStart) + " : " + 			 Integer.toHexString(bootEnd));    } catch (BmapNotFoundException e) {      System.out.println("JDP ERROR: fillBootMethodTable , could not find class VM_BootRecord, VM_MethodDictionary or VM_Method, or one of their fields.");      return;    }  }