summaryrefslogtreecommitdiff
path: root/libbacktrace
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2017-10-24 12:39:10 -0700
committerChristopher Ferris <cferris@google.com>2017-10-24 12:39:10 -0700
commit89bd927565049de9585143174226e1ee629fa9f5 (patch)
treec299f207628c1f47cce2c748a3c1627d1de357b2 /libbacktrace
parentb98352220139d6ca1b988003583fc38c72db5b19 (diff)
downloadunwinding-89bd927565049de9585143174226e1ee629fa9f5.tar.gz
Remove PauseTiming/ResumeTiming calls.
These calls can only be used after the call to state.KeepRunning(), which handles the start/stop itself. Bug: 68170209 Test: Ran the benchmark and got reasonable results. Change-Id: Ie12eb3a983f6fe60c85d6dfc90957eedc16b5526
Diffstat (limited to 'libbacktrace')
-rw-r--r--libbacktrace/backtrace_benchmarks.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/libbacktrace/backtrace_benchmarks.cpp b/libbacktrace/backtrace_benchmarks.cpp
index 30c2a55..aa1662f 100644
--- a/libbacktrace/backtrace_benchmarks.cpp
+++ b/libbacktrace/backtrace_benchmarks.cpp
@@ -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)) {
- state.PauseTiming();
// Create a remote process so that the map data is exactly the same.
// Also, so that we can create a set number of maps.
pid_t pid;
@@ -132,7 +131,6 @@ static void CreateMap(benchmark::State& state, BacktraceMap* (*map_func)(pid_t,
return;
}
- state.ResumeTiming();
while (state.KeepRunning()) {
for (size_t i = 0; i < static_cast<size_t>(state.range(0)); i++) {
BacktraceMap* map = map_func(pid, false);
@@ -143,7 +141,6 @@ static void CreateMap(benchmark::State& state, BacktraceMap* (*map_func)(pid_t,
delete map;
}
}
- state.PauseTiming();
kill(pid, SIGKILL);
waitpid(pid, nullptr, 0);