dump(FileOutputStream out) throws IOException
dump(FileOutputStream out) throws IOException, VM_PragmaInterruptible
   dump(FileOutputStream out) throws IOException      {      if (eventLoggers == null)         {         VM.sysWrite("VM_EventLogger.dump: not initialized\n");         return;         }      boolean oldState = VM.EventLoggingEnabled;      VM.EventLoggingEnabled = false;            // find earliest event      //      double earliestTimeStamp = 0;      for (int processorId = VM_Scheduler.PRIMORDIAL_PROCESSOR_ID; processorId <= VM_Scheduler.numProcessors; ++processorId)         {         VM_EventLogger eventLogger = eventLoggers[processorId - VM_Scheduler.PRIMORDIAL_PROCESSOR_ID];         int            eventIndex  = eventLogger.eventIndex;         if (eventIndex == 0)            continue;         if (earliestTimeStamp == 0 || eventLogger.timeStamp[0] < earliestTimeStamp)            earliestTimeStamp = eventLogger.timeStamp[0];         }            // write out event logs, counters, and timers      //      for (int processorId = VM_Scheduler.PRIMORDIAL_PROCESSOR_ID; processorId <= VM_Scheduler.numProcessors; ++processorId)         {         VM_EventLogger eventLogger = eventLoggers[processorId - VM_Scheduler.PRIMORDIAL_PROCESSOR_ID];         int            eventIndex  = eventLogger.eventIndex;         // write out event log         //         for (int i = 0; i < eventIndex; ++i)            {            double elapsedTime = eventLogger.timeStamp[i] - earliestTimeStamp;                        String str = "at " + format10(Double.toString(elapsedTime))                     +  " p: " + format2(Integer.toString(eventLogger.processorId[i]))                     +  " t: " + format2(Integer.toString(eventLogger.threadId[i]))                     +  " e: " + eventIdNames[eventLogger.eventId[i]];            switch (eventLogger.eventId[i])               {               case SCHEDULER_ENQUEUE:               case SCHEDULER_DEQUEUE:               str += "d: " + eventDataNames[eventLogger.eventData1[i]];               break;               case NETWORK_SELECT:               str += "d: " + eventLogger.eventData1[i] + " sockets ready";               if (eventLogger.eventData2[i] != 1)                  str += " (after " + eventLogger.eventData2[i] + " attempts)";               break;               case NETWORK_CONNECT_BEGIN:               case NETWORK_CONNECT_RETRY:               case NETWORK_CONNECT_END:               case NETWORK_ACCEPT_BEGIN:               case NETWORK_ACCEPT_RETRY:            // case NETWORK_ACCEPT_END: // below               case NETWORK_READ_BEGIN:               case NETWORK_READ_RETRY:               case NETWORK_READ_END:               case NETWORK_WRITE_BEGIN:               case NETWORK_WRITE_RETRY:               case NETWORK_WRITE_END:               str += "d: socket " + eventLogger.eventData1[i];               break;                              case NETWORK_ACCEPT_END:               str += "d: socket " + eventLogger.eventData1[i]                   +  " --> "      + eventLogger.eventData2[i];               break;               }            write(out, str + "\n");            }                  // write out counters and timers         //         write(out, "i/o operations for processor " + processorId + ": "                 + " netSelect: " + eventLogger.netSelectContentions     + "/" + eventLogger.netSelectStartOperations  + "/" + eventLogger.netSelectStopOperations                 + " netRead: "   + eventLogger.netReadStartOperations   + "/" + eventLogger.netReadRestartOperations  + "/" + eventLogger.netReadStopOperations                 + " netWrite: "  + eventLogger.netWriteStartOperations  + "/" + eventLogger.netWriteRestartOperations + "/" + eventLogger.netWriteStopOperations                 + "\n" );                  write(out, "i/o times for processor " + processorId + ":      "                 + " netSelect: " + eventLogger.netSelectElapsedTime                 + " netRead: "   + eventLogger.netReadElapsedTime                   + " netWrite: "  + eventLogger.netWriteElapsedTime                  + "\n" );                  // reset event log, counters, and timers         //         eventLogger.eventIndex = 0;         eventLogger.netSelectContentions     = eventLogger.netSelectStartOperations  = eventLogger.netSelectStopOperations = 0;         eventLogger.netReadStartOperations   = eventLogger.netReadRestartOperations  = eventLogger.netReadStopOperations   = 0;         eventLogger.netWriteStartOperations  = eventLogger.netWriteRestartOperations = eventLogger.netWriteStopOperations  = 0;         eventLogger.netSelectElapsedTime = 0;         eventLogger.netReadElapsedTime   = 0;         eventLogger.netWriteElapsedTime  = 0;         }                  VM.EventLoggingEnabled = oldState;      }