VM.sysWrite(  "VM_HPMs.writeStringToBuffer() buffer index ",index," for length ",length);
VM.sysWrite(  "VM_HPMs.writeStringToBuffer() buffer index ",index," for length "); VM.sysWrite(length);
  static public int writeStringToBufferSwapBytes(byte[] buffer, int index, byte[] bytes)    throws UninterruptiblePragma   {    if (VM.BuildForHPM && enabled) {      int length = bytes.length;      if(verbose>=8) {        VM.sysWrite(  "VM_HPMs.writeStringToBuffer() buffer index ",index," for length ",length);      }      VM_Magic.setIntAtOffset(buffer, index, HPM_info.swapByteOrder(length));   index += SIZE_OF_INT;      for (int i=0; i<length; i++) {        VM_Magic.setByteAtOffset(buffer, index, bytes[i]);        index++;      }      if(verbose>=8)VM.sysWriteln("    return index ",index);      return index;    } else {      return 0;    }  }