VM_HardwarePerformanceMonitor hpm = (VM_HardwarePerformanceMonitor)producer; if (notifyExit == true) {  if(VM_HardwarePerformanceMonitors.verbose>=4) VM.sysWriteln("VM_TraceWriter.thresholdReached() notifyExit flush current buffer ", hpm.getNameOfCurrentBuffer()); byte[] buffer = hpm.getCurrentBuffer(); int    index  = hpm.getCurrentIndex(); writeFileOutputStream(buffer, index); closeFileOutputStream(); } else {  if(VM_HardwarePerformanceMonitors.verbose>=4) VM.sysWriteln("VM_TraceWriter.thresholdReached() write full buffer ",hpm.getNameOfFullBuffer()); byte[] buffer = hpm.getFullBuffer(); int    index  = hpm.getFullIndex(); writeFileOutputStream(buffer, index); hpm.resetFull(); if (notifyExit == true) { thresholdReached(); } }
if(VM_HardwarePerformanceMonitors.verbose>=4) VM.sysWriteln("VM_TraceWriter.thresholdReached() write full buffer ",hpm.getNameOfFullBuffer()); byte[] buffer = hpm.getFullBuffer(); int    index  = hpm.getFullIndex(); writeFileOutputStream(buffer, index); hpm.resetFull();
  void thresholdReached()   {    VM_HardwarePerformanceMonitor hpm = (VM_HardwarePerformanceMonitor)producer;    if (notifyExit == true) {      // flush current buffer      if(VM_HardwarePerformanceMonitors.verbose>=4)	VM.sysWriteln("VM_TraceWriter.thresholdReached() notifyExit flush current buffer ",		      hpm.getNameOfCurrentBuffer());      byte[] buffer = hpm.getCurrentBuffer();      int    index  = hpm.getCurrentIndex();      writeFileOutputStream(buffer, index);      closeFileOutputStream();    } else {      // flush full buffer      if(VM_HardwarePerformanceMonitors.verbose>=4)	VM.sysWriteln("VM_TraceWriter.thresholdReached() write full buffer ",hpm.getNameOfFullBuffer());      byte[] buffer = hpm.getFullBuffer();      int    index  = hpm.getFullIndex();      writeFileOutputStream(buffer, index);      hpm.resetFull();          if (notifyExit == true) {	thresholdReached();      }    }  }