Merge "Remove PauseTiming/ResumeTiming calls."
am: 1ab86ad3bc
Change-Id: I1c1e3a58b668726e674cc2fb2ded3481052e3059
This commit is contained in:
commit
71a738b8ab
1 changed files with 0 additions and 3 deletions
|
|
@ -70,7 +70,6 @@ static bool CountMaps(pid_t pid, size_t* num_maps) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CreateMap(benchmark::State& state, BacktraceMap* (*map_func)(pid_t, bool)) {
|
static void CreateMap(benchmark::State& state, BacktraceMap* (*map_func)(pid_t, bool)) {
|
||||||
state.PauseTiming();
|
|
||||||
// Create a remote process so that the map data is exactly the same.
|
// Create a remote process so that the map data is exactly the same.
|
||||||
// Also, so that we can create a set number of maps.
|
// Also, so that we can create a set number of maps.
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
|
|
@ -132,7 +131,6 @@ static void CreateMap(benchmark::State& state, BacktraceMap* (*map_func)(pid_t,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
state.ResumeTiming();
|
|
||||||
while (state.KeepRunning()) {
|
while (state.KeepRunning()) {
|
||||||
for (size_t i = 0; i < static_cast<size_t>(state.range(0)); i++) {
|
for (size_t i = 0; i < static_cast<size_t>(state.range(0)); i++) {
|
||||||
BacktraceMap* map = map_func(pid, false);
|
BacktraceMap* map = map_func(pid, false);
|
||||||
|
|
@ -143,7 +141,6 @@ static void CreateMap(benchmark::State& state, BacktraceMap* (*map_func)(pid_t,
|
||||||
delete map;
|
delete map;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
state.PauseTiming();
|
|
||||||
|
|
||||||
kill(pid, SIGKILL);
|
kill(pid, SIGKILL);
|
||||||
waitpid(pid, nullptr, 0);
|
waitpid(pid, nullptr, 0);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue