2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +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:
Pavel Emelyanov
2013-08-11 13:07:21 +04:00
parent 8f4c9acda5
commit d77a05b6dc
2 changed files with 6 additions and 6 deletions

View File

@@ -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);

View File

@@ -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);
}