diff options
Diffstat (limited to 'benchmarks/unistd_benchmark.cpp')
-rw-r--r-- | benchmarks/unistd_benchmark.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/benchmarks/unistd_benchmark.cpp b/benchmarks/unistd_benchmark.cpp index 7e2ac30..94be1dd 100644 --- a/benchmarks/unistd_benchmark.cpp +++ b/benchmarks/unistd_benchmark.cpp @@ -41,6 +41,8 @@ static void BM_unistd_getpid_syscall(int iters) { } BENCHMARK(BM_unistd_getpid_syscall); +#if defined(__BIONIC__) + // Stop GCC optimizing out our pure function. /* Must not be static! */ pid_t (*gettid_fp)() = gettid; @@ -55,6 +57,8 @@ static void BM_unistd_gettid(int iters) { } BENCHMARK(BM_unistd_gettid); +#endif + static void BM_unistd_gettid_syscall(int iters) { StartBenchmarkTiming(); |