Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
d77a05b6
Commit
d77a05b6
authored
Aug 11, 2013
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stats: Rename existing timing and cnt counters into dump_... ones
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
8f4c9acd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
stats.h
include/stats.h
+2
-2
stats.c
stats.c
+4
-4
No files found.
include/stats.h
View file @
d77a05b6
...
@@ -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
);
...
...
stats.c
View file @
d77a05b6
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment