try { thresholdReached(); } catch (Exception e) { e.printStackTrace(); VM.sysFail("Exception in VM_ConsumerThread "+this);
if (notifyExit == true) {   if(VM_HardwarePerformanceMonitors.verbose>=1) VM.sysWriteln("VM_TraceWriter.thresholdReached() notifyExit flush current buffer ", hpm.getNameOfCurrentBuffer()); byte[] buffer = hpm.getCurrentBuffer(); int    index  = hpm.getCurrentIndex(); writeFileOutputStream(buffer, index); closeFileOutputStream();  } else { try { thresholdReached(); } catch (Exception e) { e.printStackTrace(); VM.sysFail("Exception in VM_ConsumerThread "+this); }
  public void run() {    initialize();    while (true) {      passivate(); // wait until externally scheduled to run      try {	thresholdReached();       // we've been scheduled; do our job!      } catch (Exception e) {	e.printStackTrace();	VM.sysFail("Exception in VM_ConsumerThread "+this);      }    }   }