Ejemplo n.º 1
0
 /** Print out statistics at the end of a GC */
 public final void printPostStats() {
   if ((Options.verbose.getValue() == 1) || (Options.verbose.getValue() == 2)) {
     Log.write("-> ");
     Log.writeDec(Conversions.pagesToBytes(getPagesUsed()).toWord().rshl(10));
     Log.write("KB   ");
     if (Options.verbose.getValue() == 1) {
       totalTime.printLast();
       Log.writeln(" ms]");
     } else {
       Log.write("End ");
       totalTime.printTotal();
       Log.writeln(" ms]");
     }
   }
   if (Options.verbose.getValue() > 2) {
     Log.write("   After Collection: ");
     Space.printUsageMB();
     if (Options.verbose.getValue() >= 4) {
       Log.write("                     ");
       Space.printUsagePages();
     }
     if (Options.verbose.getValue() >= 5) {
       Space.printVMMap();
     }
     Log.write("                     ");
     printUsedPages();
     Log.write("    Collection time: ");
     totalTime.printLast();
     Log.writeln(" ms");
   }
 }
Ejemplo n.º 2
0
 /** Print out statistics at the start of a GC */
 public void printPreStats() {
   if ((Options.verbose.getValue() == 1) || (Options.verbose.getValue() == 2)) {
     Log.write("[GC ");
     Log.write(Stats.gcCount());
     if (Options.verbose.getValue() == 1) {
       Log.write(" Start ");
       Plan.totalTime.printTotalSecs();
       Log.write(" s");
     } else {
       Log.write(" Start ");
       Plan.totalTime.printTotalMillis();
       Log.write(" ms");
     }
     Log.write("   ");
     Log.write(Conversions.pagesToKBytes(getPagesUsed()));
     Log.write("KB ");
     Log.flush();
   }
   if (Options.verbose.getValue() > 2) {
     Log.write("Collection ");
     Log.write(Stats.gcCount());
     Log.write(":        ");
     printUsedPages();
     Log.write("  Before Collection: ");
     Space.printUsageMB();
     if (Options.verbose.getValue() >= 4) {
       Log.write("                     ");
       Space.printUsagePages();
     }
     if (Options.verbose.getValue() >= 5) {
       Space.printVMMap();
     }
   }
 }