diff options
Diffstat (limited to 'libbacktrace/backtrace_benchmarks.cpp')
-rw-r--r-- | libbacktrace/backtrace_benchmarks.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libbacktrace/backtrace_benchmarks.cpp b/libbacktrace/backtrace_benchmarks.cpp index a23e3b44c..099ac60f9 100644 --- a/libbacktrace/backtrace_benchmarks.cpp +++ b/libbacktrace/backtrace_benchmarks.cpp @@ -27,6 +27,7 @@ #include <string> #include <android-base/file.h> +#include <android-base/threads.h> #include <benchmark/benchmark.h> @@ -154,7 +155,7 @@ using BacktraceCreateFn = decltype(Backtrace::Create); static void CreateBacktrace(benchmark::State& state, BacktraceMap* map, BacktraceCreateFn fn) { while (state.KeepRunning()) { - std::unique_ptr<Backtrace> backtrace(fn(getpid(), gettid(), map)); + std::unique_ptr<Backtrace> backtrace(fn(getpid(), android::base::GetThreadId(), map)); backtrace->Unwind(0); } } |