Go to the documentation of this file.00001 #include <stdio.h>
00002 #include <string.h>
00003 #include "stat.h"
00004 #include "nand.h"
00005
00006 struct nand_stat_info nand_stat;
00007 struct io_stat_info io_stat;
00008
00009
00010
00011
00012 void nand_stat_reset() {
00013 memset(&nand_stat, 0, sizeof(struct nand_stat_info));
00014 memset(&io_stat, 0, sizeof(struct io_stat_info));
00015
00016 }
00017
00018
00019
00020
00021 void nand_stat_print() {
00022 printf("\n\t[DR]\t[DW]\t[GR]\t[GW]\t[GE]\n");
00023 printf("D\t%d\t%d\t%d\t%d\t%d\n",
00024 nand_stat.data.read, nand_stat.data.write,
00025 nand_stat.gc.read, nand_stat.gc.write, nand_stat.gc.erase);
00026 printf("\nI/Ot\t[RO]\t[RS]\t[WO]\t[WS]\t[TO]\t[TS]\n");
00027 printf("\t%d\t%d\t%d\t%d\t%d\t%d\n",
00028 io_stat.cnt_read, io_stat.size_read,
00029 io_stat.cnt_write, io_stat.size_write,
00030 io_stat.cnt_trim, io_stat.size_trim);
00031 }