1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/freeList.cpp Tue Feb 26 15:57:49 2008 -0800 1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/freeList.cpp Fri Feb 29 14:42:56 2008 -0800 1.3 @@ -302,3 +302,29 @@ 1.4 #endif 1.5 } 1.6 #endif 1.7 + 1.8 +// Print the "label line" for free list stats. 1.9 +void FreeList::print_labels_on(outputStream* st, const char* c) { 1.10 + st->print("%16s\t", c); 1.11 + st->print("%14s\t" "%14s\t" "%14s\t" "%14s\t" "%14s\t" 1.12 + "%14s\t" "%14s\t" "%14s\t" "%14s\t" "%14s\t" "\n", 1.13 + "bfrsurp", "surplus", "desired", "prvSwep", "bfrSwep", 1.14 + "count", "cBirths", "cDeaths", "sBirths", "sDeaths"); 1.15 +} 1.16 + 1.17 +// Print the AllocationStats for the given free list. If the second argument 1.18 +// to the call is a non-null string, it is printed in the first column; 1.19 +// otherwise, if the argument is null (the default), then the size of the 1.20 +// (free list) block is printed in the first column. 1.21 +void FreeList::print_on(outputStream* st, const char* c) const { 1.22 + if (c != NULL) { 1.23 + st->print("%16s", c); 1.24 + } else { 1.25 + st->print(SIZE_FORMAT_W(16), size()); 1.26 + } 1.27 + st->print("\t" 1.28 + SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" 1.29 + SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\t" SSIZE_FORMAT_W(14) "\n", 1.30 + bfrSurp(), surplus(), desired(), prevSweep(), beforeSweep(), 1.31 + count(), coalBirths(), coalDeaths(), splitBirths(), splitDeaths()); 1.32 +}