int    index  = hpm.getCurrentIndex();
Offset index  = hpm.getCurrentIndex();
  public void notifyExit(int value)  {    if (VM_HardwarePerformanceMonitors.trace) {      if(VM_HardwarePerformanceMonitors.verbose>=2) {         VM.sysWriteln("VM_TraceWriter.notifyExit(",value,") PID ",pid);       }      if (trace_file == null) {        VM.sysWriteln("\n***VM_TraceWriter.notifyExit() PID ",pid," trace_file == null! notifyStartup never called!***\n");        VM.sysExit(-1);      }      // Only called once from producer when notify exit occurs.      // Flush current buffer      hpm.passivate();      byte[] buffer = hpm.getCurrentBuffer();      int    index  = hpm.getCurrentIndex();      writeFileOutputStream(buffer, index);      // write Exit record      index = 0;      byte[] buffer2 = new byte[10];      VM_Magic.setIntAtOffset( buffer2, index, VM_HardwarePerformanceMonitor.EXIT_FORMAT);// format      index += VM_HardwarePerformanceMonitors.SIZE_OF_INT;      VM_Magic.setIntAtOffset( buffer2, index, value);                                  // value      index += VM_HardwarePerformanceMonitors.SIZE_OF_INT;      writeFileOutputStream(buffer2, index);      if (VM_HardwarePerformanceMonitors.verbose>=3) {        VM.sysWrite  ("VM_TraceWriter.notifyExit(");        VM.sysWrite  (") n_records ",hpm.numberOfRecords()+1);        VM.sysWriteln(", missed ",hpm.missedRecords());      }      closeFileOutputStream();    }        }