Commit d77a05b6 authored by Pavel Emelyanov's avatar Pavel Emelyanov

stats: Rename existing timing and cnt counters into dump_... ones

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 8f4c9acd
...@@ -8,7 +8,7 @@ enum { ...@@ -8,7 +8,7 @@ enum {
TIME_MEMDUMP, TIME_MEMDUMP,
TIME_MEMWRITE, TIME_MEMWRITE,
TIME_NR_STATS, DUMP_TIME_NR_STATS,
}; };
void timing_start(int t); void timing_start(int t);
...@@ -19,7 +19,7 @@ enum { ...@@ -19,7 +19,7 @@ enum {
CNT_PAGES_SKIPPED_PARENT, CNT_PAGES_SKIPPED_PARENT,
CNT_PAGES_WRITTEN, CNT_PAGES_WRITTEN,
CNT_NR_STATS, DUMP_CNT_NR_STATS,
}; };
void cnt_add(int c, unsigned long val); void cnt_add(int c, unsigned long val);
......
...@@ -11,15 +11,15 @@ struct timing { ...@@ -11,15 +11,15 @@ struct timing {
}; };
struct dump_stats { struct dump_stats {
struct timing timings[TIME_NR_STATS]; struct timing timings[DUMP_TIME_NR_STATS];
unsigned long counts[CNT_NR_STATS]; unsigned long counts[DUMP_CNT_NR_STATS];
}; };
struct dump_stats *dstats; struct dump_stats *dstats;
void cnt_add(int c, unsigned long val) 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; dstats->counts[c] += val;
} }
...@@ -43,7 +43,7 @@ static void timeval_accumulate(const struct timeval *from, const struct timeval ...@@ -43,7 +43,7 @@ static void timeval_accumulate(const struct timeval *from, const struct timeval
void timing_start(int t) void timing_start(int t)
{ {
BUG_ON(t >= TIME_NR_STATS); BUG_ON(t >= DUMP_TIME_NR_STATS);
gettimeofday(&dstats->timings[t].start, NULL); gettimeofday(&dstats->timings[t].start, NULL);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment