mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +00:00
stats: Rename existing timing and cnt counters into dump_... ones
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
8f4c9acda5
commit
d77a05b6dc
@ -8,7 +8,7 @@ enum {
|
||||
TIME_MEMDUMP,
|
||||
TIME_MEMWRITE,
|
||||
|
||||
TIME_NR_STATS,
|
||||
DUMP_TIME_NR_STATS,
|
||||
};
|
||||
|
||||
void timing_start(int t);
|
||||
@ -19,7 +19,7 @@ enum {
|
||||
CNT_PAGES_SKIPPED_PARENT,
|
||||
CNT_PAGES_WRITTEN,
|
||||
|
||||
CNT_NR_STATS,
|
||||
DUMP_CNT_NR_STATS,
|
||||
};
|
||||
|
||||
void cnt_add(int c, unsigned long val);
|
||||
|
8
stats.c
8
stats.c
@ -11,15 +11,15 @@ struct timing {
|
||||
};
|
||||
|
||||
struct dump_stats {
|
||||
struct timing timings[TIME_NR_STATS];
|
||||
unsigned long counts[CNT_NR_STATS];
|
||||
struct timing timings[DUMP_TIME_NR_STATS];
|
||||
unsigned long counts[DUMP_CNT_NR_STATS];
|
||||
};
|
||||
|
||||
struct dump_stats *dstats;
|
||||
|
||||
void cnt_add(int c, unsigned long val)
|
||||
{
|
||||
BUG_ON(c >= CNT_NR_STATS);
|
||||
BUG_ON(c >= DUMP_CNT_NR_STATS);
|
||||
dstats->counts[c] += val;
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ static void timeval_accumulate(const struct timeval *from, const struct timeval
|
||||
|
||||
void timing_start(int t)
|
||||
{
|
||||
BUG_ON(t >= TIME_NR_STATS);
|
||||
BUG_ON(t >= DUMP_TIME_NR_STATS);
|
||||
gettimeofday(&dstats->timings[t].start, NULL);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user