示例#1
0
 public final void printUsedPages() {
   Log.write("reserved = ");
   Log.write(Conversions.pagesToMBytes(getPagesReserved()));
   Log.write(" MB (");
   Log.write(getPagesReserved());
   Log.write(" pgs)");
   Log.write("      total = ");
   Log.write(Conversions.pagesToMBytes(getTotalPages()));
   Log.write(" MB (");
   Log.write(getTotalPages());
   Log.write(" pgs)");
   Log.writeln();
 }
示例#2
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");
   }
 }
示例#3
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();
     }
   }
 }
示例#4
0
 /**
  * Return the amount of <i>memory in use</i>, in bytes. Note that this includes unused memory that
  * is held in reserve for copying, and therefore unavailable for allocation.
  *
  * @return The amount of <i>memory in use</i>, in bytes.
  */
 public static Extent reservedMemory() {
   return Conversions.pagesToBytes(VM.activePlan.global().getPagesReserved());
 }