summaryrefslogtreecommitdiff
path: root/benchmarks/spawn/spawn_benchmarks.cpp
diff options
context:
space:
mode:
authorRyan Prichard <rprichard@google.com>2020-10-07 16:32:27 -0700
committerRyan Prichard <rprichard@google.com>2020-10-16 17:55:54 -0700
commita3d41ee17669084489bbecd3262658834f43541c (patch)
tree3dc94fca23772726ddaeb1917983c44764f45c8f /benchmarks/spawn/spawn_benchmarks.cpp
parent08a43426a0bcbc53cd2a33b3624bc6b3f7176117 (diff)
Add __cxa_atexit benchmark
The benchmark calls __cxa_atexit 100000 times, then either exits early without calling the destructors (_Exit) or exits normally, calling them (exit). Test: mmma bionic/benchmarks/spawn Change-Id: I41fe702d6ef11acb7a1dec95bf546b5dc693bd4a
Diffstat (limited to 'benchmarks/spawn/spawn_benchmarks.cpp')
-rw-r--r--benchmarks/spawn/spawn_benchmarks.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/benchmarks/spawn/spawn_benchmarks.cpp b/benchmarks/spawn/spawn_benchmarks.cpp
index 931a8be5a..18dacf938 100644
--- a/benchmarks/spawn/spawn_benchmarks.cpp
+++ b/benchmarks/spawn/spawn_benchmarks.cpp
@@ -31,6 +31,8 @@
SPAWN_BENCHMARK(noop, test_program("bench_noop").c_str());
SPAWN_BENCHMARK(noop_nostl, test_program("bench_noop_nostl").c_str());
SPAWN_BENCHMARK(noop_static, test_program("bench_noop_static").c_str());
+SPAWN_BENCHMARK(bench_cxa_atexit, test_program("bench_cxa_atexit").c_str(), "100000", "_Exit");
+SPAWN_BENCHMARK(bench_cxa_atexit_full, test_program("bench_cxa_atexit").c_str(), "100000", "exit");
// Android has a /bin -> /system/bin symlink, but use /system/bin explicitly so we can more easily
// compare Bionic-vs-glibc on a Linux desktop machine.