From d77a05b6dcc0fb0b698e979c5bcc8f9c4763169d Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Sun, 11 Aug 2013 13:07:21 +0400 Subject: [PATCH] stats: Rename existing timing and cnt counters into dump_... ones Signed-off-by: Pavel Emelyanov --- include/stats.h | 4 ++-- stats.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/stats.h b/include/stats.h index 0f4a5d5d5..7d429a46d 100644 --- a/include/stats.h +++ b/include/stats.h @@ -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); diff --git a/stats.c b/stats.c index 7a173dc47..2f1517cb2 100644 --- a/stats.c +++ b/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); }