criu/include/stats.h
Pavel Emelyanov b18fb09eb9 show: Replace one-line show_foo calls with args array
We have generic do_pb_show() call and tons of show_foo
routines, that just call one with proper args. Compact
the code by putting the args into array and calling
the do_pb_show() in one place.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-24 04:00:32 +04:00

46 lines
584 B
C

#ifndef __CR_STATS_H__
#define __CR_STATS_H__
enum {
TIME_FREEZING,
TIME_FROZEN,
TIME_MEMDUMP,
TIME_MEMWRITE,
DUMP_TIME_NR_STATS,
};
enum {
TIME_FORK,
TIME_RESTORE,
RESTORE_TIME_NS_STATS,
};
void timing_start(int t);
void timing_stop(int t);
enum {
CNT_PAGES_SCANNED,
CNT_PAGES_SKIPPED_PARENT,
CNT_PAGES_WRITTEN,
DUMP_CNT_NR_STATS,
};
enum {
CNT_PAGES_COMPARED,
CNT_PAGES_SKIPPED_COW,
RESTORE_CNT_NR_STATS,
};
void cnt_add(int c, unsigned long val);
#define DUMP_STATS 1
#define RESTORE_STATS 2
int init_stats(int what);
void write_stats(int what);
#endif