VM.sysWriteln("printsummarystatistics 2");
  static void printSummaryStatistics () throws VM_PragmaUninterruptible {VM.sysWriteln("printsummarystatistics 1");    if (VM_ObjectModel.HASH_STATS) {      VM.sysWriteln("Hash operations:    ", VM_ObjectModel.hashRequests);      VM.sysWriteln("Unhashed -> Hashed: ", VM_ObjectModel.hashTransition1);      VM.sysWriteln("Hashed   -> Moved:  ", VM_ObjectModel.hashTransition2);    }    int np = VM_Scheduler.numProcessors;VM.sysWriteln("printsummarystatistics 2");    // showParameter();    if (VM_Interface.verbose() >= 1) {      VM.sysWriteln("\nGC Summary:  ", gcCount, " Collections");      if (gcCount != 0) {        if (minorGCTime.count() > 0) {          VM.sysWrite("GC Summary:  Minor Times   ");          VM.sysWrite("total ", minorGCTime.sumS(), " (s)    ");          VM.sysWrite("avg ", minorGCTime.avgMs(), " (ms)    ");          VM.sysWriteln("max ", minorGCTime.maxMs(), " (ms)    ");        }        if (majorGCTime.count() > 0) {          VM.sysWrite("GC Summary:  Major Times   ");          VM.sysWrite("total ", majorGCTime.sumS(), " (s)    ");          VM.sysWrite("avg ", majorGCTime.avgMs(), " (ms)    ");          VM.sysWriteln("max ", majorGCTime.maxMs(), " (ms)    ");        }        if (minorBytesCopied.count() > 0) {          VM.sysWrite("GC Summary:  Minor copied  ");          VM.sysWrite("avg ", (int) minorBytesCopied.avg() / 1024, " (Kb)    ");          VM.sysWriteln("max ", (int) minorBytesCopied.max() / 1024, " (Kb)");        }        if (majorBytesCopied.count() > 0) {          VM.sysWrite("GC Summary:  Major copied  ");          VM.sysWrite("avg ", (int) majorBytesCopied.avg() / 1024, " (Kb)    ");          VM.sysWriteln("max ", (int) majorBytesCopied.max() / 1024, " (Kb)");        }      }    }VM.sysWriteln("printsummarystatistics 3");    if (COUNT_COLLISIONS && (gcCount>0) && (np>1)) {      VM.sysWriteln("GC Summary:  avg number of collisions per collection = ",                    collisionCount/gcCount);    }    if (VM_Interface.verbose() >= 1 && gcCount>0) {      VM.sysWrite("Average Time in Phases of Collection:\n");      VM.sysWrite("startTime ", startTime.avgUs(), "(us) init ");      VM.sysWrite( initTime.avgUs(), "(us) stacks & statics ");      VM.sysWrite( rootTime.avgUs(), "(us) scanning ");      VM.sysWrite( scanTime.avgMs(), "(ms) finalize ");      VM.sysWrite( finalizeTime.avgUs(), "(us) finish ");      VM.sysWrite( finishTime.avgUs(), "(us)>\n\n");    }    if (VM_CollectorThread.MEASURE_WAIT_TIMES && (gcCount>0)) {      double totalBufferWait = 0.0;      double totalFinishWait = 0.0;      double totalRendezvousWait = 0.0;      int avgBufferWait=0, avgFinishWait=0, avgRendezvousWait=0;      VM_CollectorThread ct;      for (int i=1; i <= np; i++ ) {        ct = VM_CollectorThread.collectorThreads[VM_Scheduler.processors[i].id];        totalBufferWait += ct.totalBufferWait;        totalFinishWait += ct.totalFinishWait;        totalRendezvousWait += ct.totalRendezvousWait;      }      avgBufferWait = ((int)((totalBufferWait/(double)gcCount)*1000000.0))/np;      avgFinishWait = ((int)((totalFinishWait/(double)gcCount)*1000000.0))/np;      avgRendezvousWait = ((int)((totalRendezvousWait/(double)gcCount)*1000000.0))/np;      VM.sysWrite("Average Wait Times For Each Collector Thread In A Collection:\n");      VM.sysWrite("Buffer Wait ", avgBufferWait, " (us) Finish Wait ");      VM.sysWrite( avgFinishWait, " (us) Rendezvous Wait ");      VM.sysWrite( avgRendezvousWait, " (us)\n\n");    }VM.sysWriteln("printsummarystatistics 4");    if (COUNT_ALLOCATIONS) {      long bytes = 0, objects = 0, syncObjects = 0;      VM_Processor st;      for (int i = 1; i <= VM_Scheduler.numProcessors; i++) {        st = VM_Scheduler.processors[i];        bytes += st.totalBytesAllocated;        objects += st.totalObjectsAllocated;        syncObjects += st.synchronizedObjectsAllocated;      }      VM.sysWrite(" Total No. of Objects Allocated in this run ");      VM.sysWrite(Long.toString(objects));      VM.sysWrite("\n Total No. of Synchronized Objects Allocated in this run ");      VM.sysWrite(Long.toString(syncObjects));      VM.sysWrite("\n Total No. of bytes Allocated in this run ");      VM.sysWrite(Long.toString(bytes));      VM.sysWrite("\n");    }    if (COUNT_BY_TYPE)	printCountsByType();VM.sysWriteln("printsummarystatistics 5");  } // printSummaryStatistics