public void dump_stats(Writer out, boolean labels)
    throws IOException
    {
        if ( labels ) {
            out.write("--------------------------------------------------\n");
            out.write("FileManager Header:\n");
            out.write("--------------------------------------------------\n");
            out.write("Filename = " + filename + "\n");
            out.write("Allocations: " + allocs + "\n");
            out.write("Deallocations: " + deallocs +"\n");
            out.write("Coalesces: " + coalesces + "\n");
            out.write("Allocated blocks: " + allocated_blocks + "\n");
            out.write("Allocated bytes: " + allocated_words +"\n");           
            out.write("Free blocks: " + free_blocks+ "\n");
            out.write("Free bytes: " + free_words+ "\n");
            out.write("Seeks: " + seeks+ "\n");
            out.write("Requests for small blocks: " + small_requests+ "\n");
            out.write("Requests for large blocks: " + large_requests+ "\n");
            out.write("Quick list hits: " + ql_hits+ "\n");
            out.write("Misc list hits: " + ml_hits+ "\n");
            out.write("Block splits (from misc list): " + ml_splits+ "\n");
            out.write("Misc list blocks searched: " + ml_blocks_searched+ "\n");
            out.write("Fast startups: " + fast_startups+ "\n");

            //out.write("Internal blocksize = " + CACHE_PAGESIZE + "\n");
            //out.write("Cache size = " + cachesize+ "\n");
            //out.write("Cache hits: " + cache_hits+ "\n");
            //out.write("Cache misses: " + cache_misses+ "\n");
            //out.write("Page allocations: " + page_allocations+ "\n");
            out.write("Read requests: " + read_count + "\n");
            out.write("Write requests: " + write_count+ "\n");
            out.write("Accumulated physical read time:" + read_time+ "\n");
            out.write("Accumulated physical write time:" + write_time+ "\n");
            out.write("Bytes read: " + bytes_read + "\n");
            out.write("Bytes written: " + bytes_written + "\n");
        } else {
            out.write(filename + "\t");
            out.write(allocs + "\t");
            out.write(deallocs +"\t");
            out.write(coalesces + "\t");
            out.write(allocated_blocks + "\t");
            out.write(allocated_words +"\t");           
            out.write(free_blocks+ "\t");
            out.write(free_words+ "\t");

            out.write(seeks+ "\t");
            out.write(read_count + "\t");
            out.write(write_count+ "\t");
            out.write(read_time+ "\t");
            out.write(write_time+ "\t");

            out.write(bytes_read + "\t");
            out.write(bytes_written + "\t");

            out.write(small_requests+ "\t");
            out.write(large_requests+ "\t");
            out.write(ql_hits+ "\t");
            out.write(ml_hits+ "\t");
            out.write(ml_splits+ "\t");
            out.write(ml_blocks_searched+ "\t");
            out.write(fast_startups+ "\t");

            //out.write(CACHE_PAGESIZE + "\t");
            //out.write(cachesize+ "\t");
            //out.write(cache_hits+ "\t");
            //out.write(cache_misses+ "\t");
            //out.write(page_allocations+ "\t");

        }
    }
public void dump_stats ( Writer out , boolean labels ) throws IOException { if ( labels ) { out . write ( "--------------------------------------------------\n" ) ; out . write ( "FileManager Header:\n" ) ; out . write ( "--------------------------------------------------\n" ) ; out . write ( "Filename = " + filename + "\n" ) ; out . write ( "Allocations: " + allocs + "\n" ) ; out . write ( "Deallocations: " + deallocs + "\n" ) ; out . write ( "Coalesces: " + coalesces + "\n" ) ; out . write ( "Allocated blocks: " + allocated_blocks + "\n" ) ; out . write ( "Allocated bytes: " + allocated_words + "\n" ) ; out . write ( "Free blocks: " + free_blocks + "\n" ) ; out . write ( "Free bytes: " + free_words + "\n" ) ; out . write ( "Seeks: " + seeks + "\n" ) ; out . write ( "Requests for small blocks: " + small_requests + "\n" ) ; out . write ( "Requests for large blocks: " + large_requests + "\n" ) ; out . write ( "Quick list hits: " + ql_hits + "\n" ) ; out . write ( "Misc list hits: " + ml_hits + "\n" ) ; out . write ( "Block splits (from misc list): " + ml_splits + "\n" ) ; out . write ( "Misc list blocks searched: " + ml_blocks_searched + "\n" ) ; out . write ( "Fast startups: " + fast_startups + "\n" ) ; out . write ( "Read requests: " + read_count + "\n" ) ; out . write ( "Write requests: " + write_count + "\n" ) ; out . write ( "Accumulated physical read time:" + read_time + "\n" ) ; out . write ( "Accumulated physical write time:" + write_time + "\n" ) ; out . write ( "Bytes read: " + bytes_read + "\n" ) ; out . write ( "Bytes written: " + bytes_written + "\n" ) ; } else { out . write ( filename + "\t" ) ; out . write ( allocs + "\t" ) ; out . write ( deallocs + "\t" ) ; out . write ( coalesces + "\t" ) ; out . write ( allocated_blocks + "\t" ) ; out . write ( allocated_words + "\t" ) ; out . write ( free_blocks + "\t" ) ; out . write ( free_words + "\t" ) ; out . write ( seeks + "\t" ) ; out . write ( read_count + "\t" ) ; out . write ( write_count + "\t" ) ; out . write ( read_time + "\t" ) ; out . write ( write_time + "\t" ) ; out . write ( bytes_read + "\t" ) ; out . write ( bytes_written + "\t" ) ; out . write ( small_requests + "\t" ) ; out . write ( large_requests + "\t" ) ; out . write ( ql_hits + "\t" ) ; out . write ( ml_hits + "\t" ) ; out . write ( ml_splits + "\t" ) ; out . write ( ml_blocks_searched + "\t" ) ; out . write ( fast_startups + "\t" ) ; } }
Outputs statistics on memory management.  Debugging interface, writes
interesting stuff to stdout.