Generate all the benchmarks to run.

Instead of requiring the need to maintain a list of all the benchmarks,
add a programmatic way to generate all of the benchmarks.

This generation runs the benchmarks in alphabetical order.

Add a new macro BIONIC_BENCHMARK_WITH_ARG that will be the default argument
to pass to the benchmark. Change the benchmarks that require default arguments.

Add a small example xml file, and remove the full.xml/host.xml files.

Update readme.

Test: Ran new unit tests, verified all tests are added.
Change-Id: I8036daeae7635393222a7a92d18f34119adba745
diff --git a/benchmarks/Android.bp b/benchmarks/Android.bp
index 00c9560..c7c8a29 100644
--- a/benchmarks/Android.bp
+++ b/benchmarks/Android.bp
@@ -32,10 +32,10 @@
         "pthread_benchmark.cpp",
         "semaphore_benchmark.cpp",
         "stdio_benchmark.cpp",
+        "stdlib_benchmark.cpp",
         "string_benchmark.cpp",
         "time_benchmark.cpp",
         "unistd_benchmark.cpp",
-        "stdlib_benchmark.cpp",
     ],
     shared_libs: ["libtinyxml2"],
     static_libs: [
diff --git a/benchmarks/README.md b/benchmarks/README.md
index 9cb130d..b3f0c3d 100644
--- a/benchmarks/README.md
+++ b/benchmarks/README.md
@@ -16,35 +16,23 @@
     $ adb shell /data/nativetest/bionic-benchmarks/bionic-benchmarks
     $ adb shell /data/nativetest64/bionic-benchmarks/bionic-benchmarks
 
-When operated without specifying an xml file, the default is to use the
-xml file called full.xml found in the directory `suites/` bound in the
-same directory as the bionic-benchmarks executable.
-
-To use a different xml file, use the `--bionic_xml=FILE.XML` option. By
-default, this option searches for the xml file in the `suites/`
-directory. If it doesn't exist in that directory then the file will be
-found as relative to the current directory. If the option specifies the
-full path to an xml file such as `/data/nativetest/suites/example.xml`,
-it will be used as is.
+When operated without specifying an xml file, the default is to run all
+of the benchmarks in alphabetical order.
 
 You can use `--benchmark_filter=getpid` to just run benchmarks with "getpid"
 in their name.
 
 ### Host benchmarks
 
-See the benchmarks/run-on-host.sh script. The default for host tests is
-to use the `host.xml` file in the suites directory instead of `full.xml`.
-The host benchmarks can be run with 32- or 64-bit bionic, or the host glibc.
-
+See the benchmarks/run-on-host.sh script. The host benchmarks can be run
+with 32 bit or 64 bit bionic, or the host glibc.
 
 ## Suites
 
 Suites are stored in the `suites/` directory and can be chosen with the command line flag
-'--bionic_xml'. When operated without specifying an xml file, the default is to use the
-file called `full.xml` found in the directory `suites/` bound in the same directory
-as the bionic-benchmarks executable.
+'--bionic_xml'.
 
-To use a different xml file, use the `--bionic_xml=FILE.XML` option. By default, this
+To choose a specific xml file, use the `--bionic_xml=FILE.XML` option. By default, this
 option searches for the xml file in the `suites/` directory. If it doesn't exist
 in that directory then the file will be found as relative to the current
 directory. If the option specifies the full path to an xml file such as
diff --git a/benchmarks/atomic_benchmark.cpp b/benchmarks/atomic_benchmark.cpp
index a584dce..dcea1c8 100644
--- a/benchmarks/atomic_benchmark.cpp
+++ b/benchmarks/atomic_benchmark.cpp
@@ -45,14 +45,14 @@
 
 std::mutex mtx;
 
-void BM_empty(benchmark::State& state) {
+void BM_atomic_empty(benchmark::State& state) {
   while (state.KeepRunning()) {
     ++counter;
   }
 }
-BIONIC_BENCHMARK(BM_empty);
+BIONIC_BENCHMARK(BM_atomic_empty);
 
-static void BM_load_relaxed(benchmark::State& state) {
+static void BM_atomic_load_relaxed(benchmark::State& state) {
   unsigned result = 0;
   while (state.KeepRunning()) {
     result += test_loc.load(std::memory_order_relaxed);
@@ -60,9 +60,9 @@
   }
   sink = result;
 }
-BIONIC_BENCHMARK(BM_load_relaxed);
+BIONIC_BENCHMARK(BM_atomic_load_relaxed);
 
-static void BM_load_acquire(benchmark::State& state) {
+static void BM_atomic_load_acquire(benchmark::State& state) {
   unsigned result = 0;
   while (state.KeepRunning()) {
     result += test_loc.load(std::memory_order_acquire);
@@ -70,27 +70,27 @@
   }
   sink = result;
 }
-BIONIC_BENCHMARK(BM_load_acquire);
+BIONIC_BENCHMARK(BM_atomic_load_acquire);
 
-static void BM_store_release(benchmark::State& state) {
+static void BM_atomic_store_release(benchmark::State& state) {
   int i = counter;
   while (state.KeepRunning()) {
     test_loc.store(++i, std::memory_order_release);
     ++counter;
   }
 }
-BIONIC_BENCHMARK(BM_store_release);
+BIONIC_BENCHMARK(BM_atomic_store_release);
 
-static void BM_store_seq_cst(benchmark::State& state) {
+static void BM_atomic_store_seq_cst(benchmark::State& state) {
   int i = counter;
   while (state.KeepRunning()) {
     test_loc.store(++i, std::memory_order_seq_cst);
     ++counter;
   }
 }
-BIONIC_BENCHMARK(BM_store_seq_cst);
+BIONIC_BENCHMARK(BM_atomic_store_seq_cst);
 
-static void BM_fetch_add_relaxed(benchmark::State& state) {
+static void BM_atomic_fetch_add_relaxed(benchmark::State& state) {
   unsigned result = 0;
   while (state.KeepRunning()) {
     result += test_loc.fetch_add(1, std::memory_order_relaxed);
@@ -98,9 +98,9 @@
   }
   sink = result;
 }
-BIONIC_BENCHMARK(BM_fetch_add_relaxed);
+BIONIC_BENCHMARK(BM_atomic_fetch_add_relaxed);
 
-static void BM_fetch_add_seq_cst(benchmark::State& state) {
+static void BM_atomic_fetch_add_seq_cst(benchmark::State& state) {
   unsigned result = 0;
   while (state.KeepRunning()) {
     result += test_loc.fetch_add(1, std::memory_order_seq_cst);
@@ -108,12 +108,12 @@
   }
   sink = result;
 }
-BIONIC_BENCHMARK(BM_fetch_add_seq_cst);
+BIONIC_BENCHMARK(BM_atomic_fetch_add_seq_cst);
 
 // The fence benchmarks include a relaxed load to make it much harder to optimize away
 // the fence.
 
-static void BM_acquire_fence(benchmark::State& state) {
+static void BM_atomic_acquire_fence(benchmark::State& state) {
   unsigned result = 0;
   while (state.KeepRunning()) {
     result += test_loc.load(std::memory_order_relaxed);
@@ -122,9 +122,9 @@
   }
   sink = result;
 }
-BIONIC_BENCHMARK(BM_acquire_fence);
+BIONIC_BENCHMARK(BM_atomic_acquire_fence);
 
-static void BM_seq_cst_fence(benchmark::State& state) {
+static void BM_atomic_seq_cst_fence(benchmark::State& state) {
   unsigned result = 0;
   while (state.KeepRunning()) {
     result += test_loc.load(std::memory_order_relaxed);
@@ -133,11 +133,11 @@
   }
   sink = result;
 }
-BIONIC_BENCHMARK(BM_seq_cst_fence);
+BIONIC_BENCHMARK(BM_atomic_seq_cst_fence);
 
 // For comparison, also throw in a critical section version:
 
-static void BM_fetch_add_cs(benchmark::State& state) {
+static void BM_atomic_fetch_add_cs(benchmark::State& state) {
   unsigned result = 0;
   while (state.KeepRunning()) {
     {
@@ -147,4 +147,4 @@
   }
   sink = result;
 }
-BIONIC_BENCHMARK(BM_fetch_add_cs);
+BIONIC_BENCHMARK(BM_atomic_fetch_add_cs);
diff --git a/benchmarks/bionic_benchmarks.cpp b/benchmarks/bionic_benchmarks.cpp
index e61233c..27829a6 100644
--- a/benchmarks/bionic_benchmarks.cpp
+++ b/benchmarks/bionic_benchmarks.cpp
@@ -23,6 +23,7 @@
 #include <mutex>
 #include <sstream>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include <android-base/file.h>
@@ -31,13 +32,7 @@
 #include <tinyxml2.h>
 #include "util.h"
 
-#if defined(__ANDROID__)
-static constexpr const char* kDefaultSuite="full.xml";
-#else
-static constexpr const char* kDefaultSuite="host.xml";
-#endif
-
-std::map<std::string, benchmark_func_t> g_str_to_func;
+std::map<std::string, std::pair<benchmark_func_t, std::string>> g_str_to_func;
 
 std::mutex g_map_lock;
 
@@ -213,9 +208,10 @@
     cpu_to_use = secondary_opts.cpu_to_lock;
   }
 
+  benchmark_func_t benchmark_function = g_str_to_func.at(fn_name).first;
   for (std::vector<int> args : (*run_args)) {
     auto registration = benchmark::RegisterBenchmark(fn_name.c_str(), LockAndRun,
-                                                     g_str_to_func.at(fn_name),
+                                                     benchmark_function,
                                                      cpu_to_use)->Args(args);
     if (iterations_to_use > 0) {
       registration->Iterations(iterations_to_use);
@@ -372,6 +368,33 @@
   return stat(file.c_str(), &st) != -1 && S_ISREG(st.st_mode);
 }
 
+void RegisterAllBenchmarks(const bench_opts_t& opts,
+                           std::map<std::string, args_vector_t>& args_shorthand) {
+  // Add the property tests at the end since they might cause segfaults in
+  // tests running afterwards (b/62197783).
+  std::vector<std::string> prop_tests;
+
+  for (auto& entry : g_str_to_func) {
+    if (android::base::StartsWith(entry.first, "BM_property_")) {
+      prop_tests.push_back(entry.first);
+    } else {
+      auto& function_info = entry.second;
+      args_vector_t arg_vector;
+      args_vector_t* run_args = ResolveArgs(&arg_vector, function_info.second,
+                                            args_shorthand);
+      RegisterGoogleBenchmarks(bench_opts_t(), opts, entry.first, run_args);
+    }
+  }
+
+  for (auto& prop_name : prop_tests) {
+    auto& function_info = g_str_to_func.at(prop_name);
+    args_vector_t arg_vector;
+    args_vector_t* run_args = ResolveArgs(&arg_vector, function_info.second,
+                                          args_shorthand);
+    RegisterGoogleBenchmarks(bench_opts_t(), opts, prop_name, run_args);
+  }
+}
+
 int main(int argc, char** argv) {
   std::map<std::string, args_vector_t> args_shorthand = GetShorthand();
   bench_opts_t opts = ParseOpts(argc, argv);
@@ -381,12 +404,7 @@
   if (opts.xmlpath.empty()) {
     // Don't add the default xml file if a user is specifying the tests to run.
     if (opts.extra_benchmarks.empty()) {
-      // Try and use the default.
-      opts.xmlpath = android::base::GetExecutableDirectory() + "/suites/" + kDefaultSuite;
-      if (!FileExists(opts.xmlpath)) {
-        printf("Cannot find default xml file %s\n", kDefaultSuite);
-        return 1;
-      }
+      RegisterAllBenchmarks(opts, args_shorthand);
     }
   } else if (!FileExists(opts.xmlpath)) {
     // See if this is a file in the suites directory.
diff --git a/benchmarks/math_benchmark.cpp b/benchmarks/math_benchmark.cpp
index 4d9d3cb..2e54202 100644
--- a/benchmarks/math_benchmark.cpp
+++ b/benchmarks/math_benchmark.cpp
@@ -67,7 +67,7 @@
   }
   SetLabel(state);
 }
-BIONIC_BENCHMARK(BM_math_isfinite_macro);
+BIONIC_BENCHMARK_WITH_ARG(BM_math_isfinite_macro, "MATH_COMMON");
 
 static void BM_math_isfinite(benchmark::State& state) {
   d = 0.0;
@@ -77,7 +77,7 @@
   }
   SetLabel(state);
 }
-BIONIC_BENCHMARK(BM_math_isfinite);
+BIONIC_BENCHMARK_WITH_ARG(BM_math_isfinite, "MATH_COMMON");
 
 static void BM_math_isinf_macro(benchmark::State& state) {
   d = 0.0;
@@ -87,7 +87,7 @@
   }
   SetLabel(state);
 }
-BIONIC_BENCHMARK(BM_math_isinf_macro);
+BIONIC_BENCHMARK_WITH_ARG(BM_math_isinf_macro, "MATH_COMMON");
 
 static void BM_math_isinf(benchmark::State& state) {
   d = 0.0;
@@ -97,7 +97,7 @@
   }
   SetLabel(state);
 }
-BIONIC_BENCHMARK(BM_math_isinf);
+BIONIC_BENCHMARK_WITH_ARG(BM_math_isinf, "MATH_COMMON");
 
 static void BM_math_isnan_macro(benchmark::State& state) {
   d = 0.0;
@@ -107,7 +107,7 @@
   }
   SetLabel(state);
 }
-BIONIC_BENCHMARK(BM_math_isnan_macro);
+BIONIC_BENCHMARK_WITH_ARG(BM_math_isnan_macro, "MATH_COMMON");
 
 static void BM_math_isnan(benchmark::State& state) {
   d = 0.0;
@@ -117,7 +117,7 @@
   }
   SetLabel(state);
 }
-BIONIC_BENCHMARK(BM_math_isnan);
+BIONIC_BENCHMARK_WITH_ARG(BM_math_isnan, "MATH_COMMON");
 
 static void BM_math_isnormal_macro(benchmark::State& state) {
   d = 0.0;
@@ -127,7 +127,7 @@
   }
   SetLabel(state);
 }
-BIONIC_BENCHMARK(BM_math_isnormal_macro);
+BIONIC_BENCHMARK_WITH_ARG(BM_math_isnormal_macro, "MATH_COMMON");
 
 static void BM_math_isnormal(benchmark::State& state) {
   d = 0.0;
@@ -137,7 +137,7 @@
   }
   SetLabel(state);
 }
-BIONIC_BENCHMARK(BM_math_isnormal);
+BIONIC_BENCHMARK_WITH_ARG(BM_math_isnormal, "MATH_COMMON");
 
 static void BM_math_sin_fast(benchmark::State& state) {
   d = 1.0;
@@ -179,7 +179,7 @@
   }
   SetLabel(state);
 }
-BIONIC_BENCHMARK(BM_math_fpclassify);
+BIONIC_BENCHMARK_WITH_ARG(BM_math_fpclassify, "MATH_COMMON");
 
 static void BM_math_signbit_macro(benchmark::State& state) {
   d = 0.0;
@@ -189,7 +189,7 @@
   }
   SetLabel(state);
 }
-BIONIC_BENCHMARK(BM_math_signbit_macro);
+BIONIC_BENCHMARK_WITH_ARG(BM_math_signbit_macro, "MATH_COMMON");
 
 static void BM_math_signbit(benchmark::State& state) {
   d = 0.0;
@@ -199,7 +199,7 @@
   }
   SetLabel(state);
 }
-BIONIC_BENCHMARK(BM_math_signbit);
+BIONIC_BENCHMARK_WITH_ARG(BM_math_signbit, "MATH_COMMON");
 
 static void BM_math_fabs_macro(benchmark::State& state) {
   d = 0.0;
@@ -209,7 +209,7 @@
   }
   SetLabel(state);
 }
-BIONIC_BENCHMARK(BM_math_fabs_macro);
+BIONIC_BENCHMARK_WITH_ARG(BM_math_fabs_macro, "MATH_COMMON");
 
 static void BM_math_fabs(benchmark::State& state) {
   d = 0.0;
@@ -219,4 +219,4 @@
   }
   SetLabel(state);
 }
-BIONIC_BENCHMARK(BM_math_fabs);
+BIONIC_BENCHMARK_WITH_ARG(BM_math_fabs, "MATH_COMMON");
diff --git a/benchmarks/property_benchmark.cpp b/benchmarks/property_benchmark.cpp
index a099494..5760bf1 100644
--- a/benchmarks/property_benchmark.cpp
+++ b/benchmarks/property_benchmark.cpp
@@ -141,7 +141,7 @@
     __system_property_get(pa.names[random() % nprops], value);
   }
 }
-BIONIC_BENCHMARK(BM_property_get);
+BIONIC_BENCHMARK_WITH_ARG(BM_property_get, "NUM_PROPS");
 
 static void BM_property_find(benchmark::State& state) {
   const size_t nprops = state.range(0);
@@ -153,7 +153,7 @@
     __system_property_find(pa.names[random() % nprops]);
   }
 }
-BIONIC_BENCHMARK(BM_property_find);
+BIONIC_BENCHMARK_WITH_ARG(BM_property_find, "NUM_PROPS");
 
 static void BM_property_read(benchmark::State& state) {
   const size_t nprops = state.range(0);
@@ -176,7 +176,7 @@
 
   delete[] pinfo;
 }
-BIONIC_BENCHMARK(BM_property_read);
+BIONIC_BENCHMARK_WITH_ARG(BM_property_read, "NUM_PROPS");
 
 static void BM_property_serial(benchmark::State& state) {
   const size_t nprops = state.range(0);
@@ -197,6 +197,6 @@
 
   delete[] pinfo;
 }
-BIONIC_BENCHMARK(BM_property_serial);
+BIONIC_BENCHMARK_WITH_ARG(BM_property_serial, "NUM_PROPS");
 
 #endif  // __BIONIC__
diff --git a/benchmarks/stdio_benchmark.cpp b/benchmarks/stdio_benchmark.cpp
index 76e9ddb..d547fed 100644
--- a/benchmarks/stdio_benchmark.cpp
+++ b/benchmarks/stdio_benchmark.cpp
@@ -59,22 +59,22 @@
 void BM_stdio_fread(benchmark::State& state) {
   ReadWriteTest(state, fread, true);
 }
-BIONIC_BENCHMARK(BM_stdio_fread);
+BIONIC_BENCHMARK_WITH_ARG(BM_stdio_fread, "AT_COMMON_SIZES");
 
 void BM_stdio_fwrite(benchmark::State& state) {
   ReadWriteTest(state, fwrite, true);
 }
-BIONIC_BENCHMARK(BM_stdio_fwrite);
+BIONIC_BENCHMARK_WITH_ARG(BM_stdio_fwrite, "AT_COMMON_SIZES");
 
 void BM_stdio_fread_unbuffered(benchmark::State& state) {
   ReadWriteTest(state, fread, false);
 }
-BIONIC_BENCHMARK(BM_stdio_fread_unbuffered);
+BIONIC_BENCHMARK_WITH_ARG(BM_stdio_fread_unbuffered, "AT_COMMON_SIZES");
 
 void BM_stdio_fwrite_unbuffered(benchmark::State& state) {
   ReadWriteTest(state, fwrite, false);
 }
-BIONIC_BENCHMARK(BM_stdio_fwrite_unbuffered);
+BIONIC_BENCHMARK_WITH_ARG(BM_stdio_fwrite_unbuffered, "AT_COMMON_SIZES");
 
 #if !defined(__GLIBC__)
 static void FopenFgetlnFclose(benchmark::State& state, bool no_locking) {
@@ -165,12 +165,12 @@
 static void BM_stdio_fopen_fgetc_fclose_locking(benchmark::State& state) {
   FopenFgetcFclose(state, false);
 }
-BIONIC_BENCHMARK(BM_stdio_fopen_fgetc_fclose_locking);
+BIONIC_BENCHMARK_WITH_ARG(BM_stdio_fopen_fgetc_fclose_locking, "1024");
 
 void BM_stdio_fopen_fgetc_fclose_no_locking(benchmark::State& state) {
   FopenFgetcFclose(state, true);
 }
-BIONIC_BENCHMARK(BM_stdio_fopen_fgetc_fclose_no_locking);
+BIONIC_BENCHMARK_WITH_ARG(BM_stdio_fopen_fgetc_fclose_no_locking, "1024");
 
 static void BM_stdio_printf_literal(benchmark::State& state) {
   while (state.KeepRunning()) {
diff --git a/benchmarks/stdlib_benchmark.cpp b/benchmarks/stdlib_benchmark.cpp
index eb325ab..0bee683 100644
--- a/benchmarks/stdlib_benchmark.cpp
+++ b/benchmarks/stdlib_benchmark.cpp
@@ -33,7 +33,7 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
 }
-BIONIC_BENCHMARK(BM_stdlib_malloc_free);
+BIONIC_BENCHMARK_WITH_ARG(BM_stdlib_malloc_free, "AT_COMMON_SIZES");
 
 static void BM_stdlib_mbstowcs(benchmark::State& state) {
   const size_t buf_alignment = state.range(0);
@@ -76,7 +76,7 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(500000));
 }
-BIONIC_BENCHMARK(BM_stdlib_mbstowcs);
+BIONIC_BENCHMARK_WITH_ARG(BM_stdlib_mbstowcs, "0 0");
 
 static void BM_stdlib_mbrtowc(benchmark::State& state) {
   const size_t buf_alignment = state.range(0);
@@ -117,4 +117,4 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(500000));
 }
-BIONIC_BENCHMARK(BM_stdlib_mbrtowc);
+BIONIC_BENCHMARK_WITH_ARG(BM_stdlib_mbrtowc, "0");
diff --git a/benchmarks/string_benchmark.cpp b/benchmarks/string_benchmark.cpp
index eb04c93..9635929 100644
--- a/benchmarks/string_benchmark.cpp
+++ b/benchmarks/string_benchmark.cpp
@@ -38,7 +38,7 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
 }
-BIONIC_BENCHMARK(BM_string_memcmp);
+BIONIC_BENCHMARK_WITH_ARG(BM_string_memcmp, "AT_ALIGNED_TWOBUF");
 
 static void BM_string_memcpy(benchmark::State& state) {
   const size_t nbytes = state.range(0);
@@ -56,7 +56,7 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
 }
-BIONIC_BENCHMARK(BM_string_memcpy);
+BIONIC_BENCHMARK_WITH_ARG(BM_string_memcpy, "AT_ALIGNED_TWOBUF");
 
 static void BM_string_memmove_non_overlapping(benchmark::State& state) {
   const size_t nbytes = state.range(0);
@@ -74,7 +74,7 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
 }
-BIONIC_BENCHMARK(BM_string_memmove_non_overlapping);
+BIONIC_BENCHMARK_WITH_ARG(BM_string_memmove_non_overlapping, "AT_ALIGNED_TWOBUF");
 
 static void BM_string_memmove_overlap_dst_before_src(benchmark::State& state) {
   const size_t nbytes = state.range(0);
@@ -89,7 +89,7 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
 }
-BIONIC_BENCHMARK(BM_string_memmove_overlap_dst_before_src);
+BIONIC_BENCHMARK_WITH_ARG(BM_string_memmove_overlap_dst_before_src, "AT_ALIGNED_ONEBUF");
 
 static void BM_string_memmove_overlap_src_before_dst(benchmark::State& state) {
   const size_t nbytes = state.range(0);
@@ -104,7 +104,7 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
 }
-BIONIC_BENCHMARK(BM_string_memmove_overlap_src_before_dst);
+BIONIC_BENCHMARK_WITH_ARG(BM_string_memmove_overlap_src_before_dst, "AT_ALIGNED_ONEBUF");
 
 static void BM_string_memset(benchmark::State& state) {
   const size_t nbytes = state.range(0);
@@ -119,7 +119,7 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
 }
-BIONIC_BENCHMARK(BM_string_memset);
+BIONIC_BENCHMARK_WITH_ARG(BM_string_memset, "AT_ALIGNED_ONEBUF");
 
 static void BM_string_strlen(benchmark::State& state) {
   const size_t nbytes = state.range(0);
@@ -136,7 +136,7 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
 }
-BIONIC_BENCHMARK(BM_string_strlen);
+BIONIC_BENCHMARK_WITH_ARG(BM_string_strlen, "AT_ALIGNED_ONEBUF");
 
 static void BM_string_strcat_copy_only(benchmark::State& state) {
   const size_t nbytes = state.range(0);
@@ -159,7 +159,7 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
 }
-BIONIC_BENCHMARK(BM_string_strcat_copy_only);
+BIONIC_BENCHMARK_WITH_ARG(BM_string_strcat_copy_only, "AT_ALIGNED_TWOBUF");
 
 static void BM_string_strcat_seek_only(benchmark::State& state) {
   const size_t nbytes = state.range(0);
@@ -180,7 +180,7 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
 }
-BIONIC_BENCHMARK(BM_string_strcat_seek_only);
+BIONIC_BENCHMARK_WITH_ARG(BM_string_strcat_seek_only, "AT_ALIGNED_TWOBUF");
 
 static void BM_string_strcat_half_copy_half_seek(benchmark::State& state) {
   const size_t nbytes = state.range(0);
@@ -201,7 +201,7 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
 }
-BIONIC_BENCHMARK(BM_string_strcat_half_copy_half_seek);
+BIONIC_BENCHMARK_WITH_ARG(BM_string_strcat_half_copy_half_seek, "AT_ALIGNED_TWOBUF");
 
 static void BM_string_strcpy(benchmark::State& state) {
   const size_t nbytes = state.range(0);
@@ -220,7 +220,7 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
 }
-BIONIC_BENCHMARK(BM_string_strcpy);
+BIONIC_BENCHMARK_WITH_ARG(BM_string_strcpy, "AT_ALIGNED_TWOBUF");
 
 static void BM_string_strcmp(benchmark::State& state) {
   const size_t nbytes = state.range(0);
@@ -241,7 +241,7 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
 }
-BIONIC_BENCHMARK(BM_string_strcmp);
+BIONIC_BENCHMARK_WITH_ARG(BM_string_strcmp, "AT_ALIGNED_TWOBUF");
 
 static void BM_string_strstr(benchmark::State& state) {
   const size_t nbytes = state.range(0);
@@ -270,7 +270,7 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
 }
-BIONIC_BENCHMARK(BM_string_strstr);
+BIONIC_BENCHMARK_WITH_ARG(BM_string_strstr, "AT_ALIGNED_TWOBUF");
 
 static void BM_string_strchr(benchmark::State& state) {
   const size_t nbytes = state.range(0);
@@ -288,4 +288,4 @@
 
   state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes));
 }
-BIONIC_BENCHMARK(BM_string_strchr);
+BIONIC_BENCHMARK_WITH_ARG(BM_string_strchr, "AT_ALIGNED_ONEBUF");
diff --git a/benchmarks/suites/example.xml b/benchmarks/suites/example.xml
new file mode 100644
index 0000000..51dd2ab
--- /dev/null
+++ b/benchmarks/suites/example.xml
@@ -0,0 +1,8 @@
+<!--
+ Small example file.
+-->
+<fn>
+  <name>BM_stdio_fread</name>
+  <iterations>20</iterations>
+  <args>AT_COMMON_SIZES</args>
+</fn>
diff --git a/benchmarks/suites/full.xml b/benchmarks/suites/full.xml
deleted file mode 100644
index 9bfd6ff..0000000
--- a/benchmarks/suites/full.xml
+++ /dev/null
@@ -1,323 +0,0 @@
-<fn>
-  <name>BM_empty</name>
-</fn>
-<fn>
-  <name>BM_load_relaxed</name>
-</fn>
-<fn>
-  <name>BM_load_acquire</name>
-</fn>
-<fn>
-  <name>BM_store_release</name>
-</fn>
-<fn>
-  <name>BM_store_seq_cst</name>
-</fn>
-<fn>
-  <name>BM_fetch_add_relaxed</name>
-</fn>
-<fn>
-  <name>BM_fetch_add_seq_cst</name>
-</fn>
-<fn>
-  <name>BM_acquire_fence</name>
-</fn>
-<fn>
-  <name>BM_seq_cst_fence</name>
-</fn>
-<fn>
-  <name>BM_fetch_add_cs</name>
-</fn>
-<fn>
-  <name>BM_math_sqrt</name>
-</fn>
-<fn>
-  <name>BM_math_log10</name>
-</fn>
-<fn>
-  <name>BM_math_logb</name>
-</fn>
-<fn>
-  <name>BM_math_isfinite_macro</name>
-  <args>MATH_COMMON</args>
-</fn>
-<fn>
-  <name>BM_math_isfinite</name>
-  <args>MATH_COMMON</args>
-</fn>
-<fn>
-  <name>BM_math_isinf_macro</name>
-  <args>MATH_COMMON</args>
-</fn>
-<fn>
-  <name>BM_math_isinf</name>
-  <args>MATH_COMMON</args>
-</fn>
-<fn>
-  <name>BM_math_isnan_macro</name>
-  <args>MATH_COMMON</args>
-</fn>
-<fn>
-  <name>BM_math_isnan</name>
-  <args>MATH_COMMON</args>
-</fn>
-<fn>
-  <name>BM_math_isnormal_macro</name>
-  <args>MATH_COMMON</args>
-</fn>
-<fn>
-  <name>BM_math_isnormal</name>
-  <args>MATH_COMMON</args>
-</fn>
-<fn>
-  <name>BM_math_sin_fast</name>
-</fn>
-<fn>
-  <name>BM_math_sin_feupdateenv</name>
-</fn>
-<fn>
-  <name>BM_math_sin_fesetenv</name>
-</fn>
-<fn>
-  <name>BM_math_fpclassify</name>
-  <args>MATH_COMMON</args>
-</fn>
-<fn>
-  <name>BM_math_signbit_macro</name>
-  <args>MATH_COMMON</args>
-</fn>
-<fn>
-  <name>BM_math_signbit</name>
-  <args>MATH_COMMON</args>
-</fn>
-<fn>
-  <name>BM_math_fabs_macro</name>
-  <args>MATH_COMMON</args>
-</fn>
-<fn>
-  <name>BM_math_fabs</name>
-  <args>MATH_COMMON</args>
-</fn>
-<fn>
-  <name>BM_pthread_self</name>
-</fn>
-<fn>
-  <name>BM_pthread_getspecific</name>
-</fn>
-<fn>
-  <name>BM_pthread_setspecific</name>
-</fn>
-<fn>
-  <name>BM_pthread_once</name>
-</fn>
-<fn>
-  <name>BM_pthread_mutex_lock</name>
-</fn>
-<fn>
-  <name>BM_pthread_mutex_lock_ERRORCHECK</name>
-</fn>
-<fn>
-  <name>BM_pthread_mutex_lock_RECURSIVE</name>
-</fn>
-<fn>
-  <name>BM_pthread_rwlock_read</name>
-</fn>
-<fn>
-  <name>BM_pthread_rwlock_write</name>
-</fn>
-<fn>
-  <name>BM_pthread_create</name>
-</fn>
-<fn>
-  <name>BM_pthread_create_and_run</name>
-</fn>
-<fn>
-  <name>BM_pthread_exit_and_join</name>
-</fn>
-<fn>
-  <name>BM_pthread_key_create</name>
-</fn>
-<fn>
-  <name>BM_pthread_key_delete</name>
-</fn>
-<fn>
-  <name>BM_semaphore_sem_getvalue</name>
-</fn>
-<fn>
-  <name>BM_semaphore_sem_wait_sem_post</name>
-</fn>
-<fn>
-  <name>BM_stdio_fread</name>
-  <args>AT_COMMON_SIZES</args>
-</fn>
-<fn>
-  <name>BM_stdio_fwrite</name>
-  <args>AT_COMMON_SIZES</args>
-</fn>
-<fn>
-  <name>BM_stdio_fread_unbuffered</name>
-  <args>AT_COMMON_SIZES</args>
-</fn>
-<fn>
-  <name>BM_stdio_fwrite_unbuffered</name>
-  <args>AT_COMMON_SIZES</args>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_fgetln_fclose_locking</name>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_fgetln_fclose_no_locking</name>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_fgets_fclose_locking</name>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_fgets_fclose_no_locking</name>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_fgetc_fclose_locking</name>
-  <args>1024</args>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_fgetc_fclose_no_locking</name>
-  <args>1024</args>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_getline_fclose_locking</name>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_getline_fclose_no_locking</name>
-</fn>
-<fn>
-  <name>BM_stdio_printf_literal</name>
-</fn>
-<fn>
-  <name>BM_stdio_printf_s</name>
-</fn>
-<fn>
-  <name>BM_stdio_printf_d</name>
-</fn>
-<fn>
-  <name>BM_stdio_printf_1$s</name>
-</fn>
-<fn>
-  <name>BM_string_memcmp</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_memcpy</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_memmove_non_overlapping</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_memmove_overlap_dst_before_src</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_string_memmove_overlap_src_before_dst</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_string_memset</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strlen</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strcat_copy_only</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strcat_seek_only</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strcat_half_copy_half_seek</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strcpy</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strcmp</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strstr</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strchr</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_time_clock_gettime</name>
-</fn>
-<fn>
-  <name>BM_time_clock_gettime_syscall</name>
-</fn>
-<fn>
-  <name>BM_time_gettimeofday</name>
-</fn>
-<fn>
-  <name>BM_time_gettimeofday_syscall</name>
-</fn>
-<fn>
-  <name>BM_time_time</name>
-</fn>
-<fn>
-  <name>BM_time_localtime</name>
-</fn>
-<fn>
-  <name>BM_time_localtime_r</name>
-</fn>
-<fn>
-  <name>BM_unistd_getpid</name>
-</fn>
-<fn>
-  <name>BM_unistd_getpid_syscall</name>
-</fn>
-<fn>
-  <name>BM_unistd_gettid</name>
-</fn>
-<fn>
-  <name>BM_unistd_gettid_syscall</name>
-</fn>
-<fn>
-  <name>BM_stdlib_malloc_free</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_stdlib_mbstowcs</name>
-  <args>0 0</args>
-</fn>
-<fn>
-  <name>BM_stdlib_mbrtowc</name>
-  <args>0</args>
-</fn>
-<!--
- Put the property tests at the end since they might cause segfaults in
- tests running afterwards (b/62197783).
--->
-<fn>
-  <name>BM_property_get</name>
-  <args>NUM_PROPS</args>
-</fn>
-<fn>
-  <name>BM_property_find</name>
-  <args>NUM_PROPS</args>
-</fn>
-<fn>
-  <name>BM_property_read</name>
-  <args>NUM_PROPS</args>
-</fn>
-<fn>
-  <name>BM_property_serial</name>
-  <args>NUM_PROPS</args>
-</fn>
diff --git a/benchmarks/suites/host.xml b/benchmarks/suites/host.xml
deleted file mode 100644
index 05769e9..0000000
--- a/benchmarks/suites/host.xml
+++ /dev/null
@@ -1,274 +0,0 @@
-<fn>
-  <name>BM_empty</name>
-</fn>
-<fn>
-  <name>BM_load_relaxed</name>
-</fn>
-<fn>
-  <name>BM_load_acquire</name>
-</fn>
-<fn>
-  <name>BM_store_release</name>
-</fn>
-<fn>
-  <name>BM_store_seq_cst</name>
-</fn>
-<fn>
-  <name>BM_fetch_add_relaxed</name>
-</fn>
-<fn>
-  <name>BM_fetch_add_seq_cst</name>
-</fn>
-<fn>
-  <name>BM_acquire_fence</name>
-</fn>
-<fn>
-  <name>BM_seq_cst_fence</name>
-</fn>
-<fn>
-  <name>BM_fetch_add_cs</name>
-</fn>
-<fn>
-  <name>BM_math_sqrt</name>
-</fn>
-<fn>
-  <name>BM_math_log10</name>
-</fn>
-<fn>
-  <name>BM_math_logb</name>
-</fn>
-<fn>
-  <name>BM_math_isfinite_macro</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_isfinite</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_isinf_macro</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_isinf</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_isnan_macro</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_isnan</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_isnormal_macro</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_sin_fast</name>
-</fn>
-<fn>
-  <name>BM_math_sin_feupdateenv</name>
-</fn>
-<fn>
-  <name>BM_math_sin_fesetenv</name>
-</fn>
-<fn>
-  <name>BM_math_fpclassify</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_signbit_macro</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_signbit</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_fabs_macro</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_math_fabs</name>
-  <args>0</args>
-</fn>
-<fn>
-  <name>BM_pthread_self</name>
-</fn>
-<fn>
-  <name>BM_pthread_getspecific</name>
-</fn>
-<fn>
-  <name>BM_pthread_setspecific</name>
-</fn>
-<fn>
-  <name>BM_pthread_once</name>
-</fn>
-<fn>
-  <name>BM_pthread_mutex_lock</name>
-</fn>
-<fn>
-  <name>BM_pthread_mutex_lock_ERRORCHECK</name>
-</fn>
-<fn>
-  <name>BM_pthread_mutex_lock_RECURSIVE</name>
-</fn>
-<fn>
-  <name>BM_pthread_rwlock_read</name>
-</fn>
-<fn>
-  <name>BM_pthread_rwlock_write</name>
-</fn>
-<fn>
-  <name>BM_pthread_create</name>
-</fn>
-<fn>
-  <name>BM_pthread_create_and_run</name>
-</fn>
-<fn>
-  <name>BM_pthread_exit_and_join</name>
-</fn>
-<fn>
-  <name>BM_pthread_key_create</name>
-</fn>
-<fn>
-  <name>BM_pthread_key_delete</name>
-</fn>
-<fn>
-  <name>BM_semaphore_sem_getvalue</name>
-</fn>
-<fn>
-  <name>BM_semaphore_sem_wait_sem_post</name>
-</fn>
-<fn>
-  <name>BM_stdio_fread</name>
-  <args>AT_COMMON_SIZES</args>
-</fn>
-<fn>
-  <name>BM_stdio_fwrite</name>
-  <args>AT_COMMON_SIZES</args>
-</fn>
-<fn>
-  <name>BM_stdio_fread_unbuffered</name>
-  <args>AT_COMMON_SIZES</args>
-</fn>
-<fn>
-  <name>BM_stdio_fwrite_unbuffered</name>
-  <args>AT_COMMON_SIZES</args>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_fgets_fclose_locking</name>
-  <args>1024</args>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_fgets_fclose_no_locking</name>
-  <args>1024</args>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_fgetc_fclose_locking</name>
-  <args>1024</args>
-</fn>
-<fn>
-  <name>BM_stdio_fopen_fgetc_fclose_no_locking</name>
-  <args>1024</args>
-</fn>
-<fn>
-  <name>BM_string_memcmp</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_memcpy</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_memmove_non_overlapping</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_memmove_overlap_dst_before_src</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_string_memmove_overlap_src_before_dst</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_string_memset</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strlen</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strcat_copy_only</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strcat_seek_only</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strcat_half_copy_half_seek</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strcpy</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strcmp</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strstr</name>
-  <args>AT_ALIGNED_TWOBUF</args>
-</fn>
-<fn>
-  <name>BM_string_strchr</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_time_clock_gettime</name>
-</fn>
-<fn>
-  <name>BM_time_clock_gettime_syscall</name>
-</fn>
-<fn>
-  <name>BM_time_gettimeofday</name>
-</fn>
-<fn>
-  <name>BM_time_gettimeofday_syscall</name>
-</fn>
-<fn>
-  <name>BM_time_time</name>
-</fn>
-<fn>
-  <name>BM_time_localtime</name>
-</fn>
-<fn>
-  <name>BM_time_localtime_r</name>
-</fn>
-<fn>
-  <name>BM_unistd_getpid</name>
-</fn>
-<fn>
-  <name>BM_unistd_getpid_syscall</name>
-</fn>
-<fn>
-  <name>BM_unistd_gettid_syscall</name>
-</fn>
-<fn>
-  <name>BM_stdlib_malloc_free</name>
-  <args>AT_ALIGNED_ONEBUF</args>
-</fn>
-<fn>
-  <name>BM_stdlib_mbstowcs</name>
-  <args>0 0</args>
-</fn>
-<fn>
-  <name>BM_stdlib_mbrtowc</name>
-  <args>0</args>
-</fn>
diff --git a/benchmarks/test_suites/test_from_each.xml b/benchmarks/test_suites/test_from_each.xml
index 0118365..bad18e7 100644
--- a/benchmarks/test_suites/test_from_each.xml
+++ b/benchmarks/test_suites/test_from_each.xml
@@ -1,5 +1,5 @@
 <fn>
-  <name>BM_empty</name>
+  <name>BM_atomic_empty</name>
 </fn>
 <fn>
   <name>BM_math_sqrt</name>
diff --git a/benchmarks/tests/interface_test.cpp b/benchmarks/tests/interface_test.cpp
index 6987320..3e87afe 100644
--- a/benchmarks/tests/interface_test.cpp
+++ b/benchmarks/tests/interface_test.cpp
@@ -164,92 +164,100 @@
   Verify(expected, 0, std::vector<const char*>{"--help"}, false);
 }
 
-TEST_F(SystemTests, full_suite) {
+TEST_F(SystemTests, all_benchmarks) {
   std::string expected =
-    "BM_empty/iterations:1\n"
-    "BM_load_relaxed/iterations:1\n"
-    "BM_load_acquire/iterations:1\n"
-    "BM_store_release/iterations:1\n"
-    "BM_store_seq_cst/iterations:1\n"
-    "BM_fetch_add_relaxed/iterations:1\n"
-    "BM_fetch_add_seq_cst/iterations:1\n"
-    "BM_acquire_fence/iterations:1\n"
-    "BM_seq_cst_fence/iterations:1\n"
-    "BM_fetch_add_cs/iterations:1\n"
-    "BM_math_sqrt/iterations:1\n"
-    "BM_math_log10/iterations:1\n"
-    "BM_math_logb/iterations:1\n"
-    "BM_math_isfinite_macro/0/iterations:1\n"
-    "BM_math_isfinite_macro/1/iterations:1\n"
-    "BM_math_isfinite_macro/2/iterations:1\n"
-    "BM_math_isfinite_macro/3/iterations:1\n"
-    "BM_math_isfinite/0/iterations:1\n"
-    "BM_math_isfinite/1/iterations:1\n"
-    "BM_math_isfinite/2/iterations:1\n"
-    "BM_math_isfinite/3/iterations:1\n"
-    "BM_math_isinf_macro/0/iterations:1\n"
-    "BM_math_isinf_macro/1/iterations:1\n"
-    "BM_math_isinf_macro/2/iterations:1\n"
-    "BM_math_isinf_macro/3/iterations:1\n"
-    "BM_math_isinf/0/iterations:1\n"
-    "BM_math_isinf/1/iterations:1\n"
-    "BM_math_isinf/2/iterations:1\n"
-    "BM_math_isinf/3/iterations:1\n"
-    "BM_math_isnan_macro/0/iterations:1\n"
-    "BM_math_isnan_macro/1/iterations:1\n"
-    "BM_math_isnan_macro/2/iterations:1\n"
-    "BM_math_isnan_macro/3/iterations:1\n"
-    "BM_math_isnan/0/iterations:1\n"
-    "BM_math_isnan/1/iterations:1\n"
-    "BM_math_isnan/2/iterations:1\n"
-    "BM_math_isnan/3/iterations:1\n"
-    "BM_math_isnormal_macro/0/iterations:1\n"
-    "BM_math_isnormal_macro/1/iterations:1\n"
-    "BM_math_isnormal_macro/2/iterations:1\n"
-    "BM_math_isnormal_macro/3/iterations:1\n"
-    "BM_math_isnormal/0/iterations:1\n"
-    "BM_math_isnormal/1/iterations:1\n"
-    "BM_math_isnormal/2/iterations:1\n"
-    "BM_math_isnormal/3/iterations:1\n"
-    "BM_math_sin_fast/iterations:1\n"
-    "BM_math_sin_feupdateenv/iterations:1\n"
-    "BM_math_sin_fesetenv/iterations:1\n"
-    "BM_math_fpclassify/0/iterations:1\n"
-    "BM_math_fpclassify/1/iterations:1\n"
-    "BM_math_fpclassify/2/iterations:1\n"
-    "BM_math_fpclassify/3/iterations:1\n"
-    "BM_math_signbit_macro/0/iterations:1\n"
-    "BM_math_signbit_macro/1/iterations:1\n"
-    "BM_math_signbit_macro/2/iterations:1\n"
-    "BM_math_signbit_macro/3/iterations:1\n"
-    "BM_math_signbit/0/iterations:1\n"
-    "BM_math_signbit/1/iterations:1\n"
-    "BM_math_signbit/2/iterations:1\n"
-    "BM_math_signbit/3/iterations:1\n"
-    "BM_math_fabs_macro/0/iterations:1\n"
-    "BM_math_fabs_macro/1/iterations:1\n"
-    "BM_math_fabs_macro/2/iterations:1\n"
-    "BM_math_fabs_macro/3/iterations:1\n"
+    "BM_atomic_acquire_fence/iterations:1\n"
+    "BM_atomic_empty/iterations:1\n"
+    "BM_atomic_fetch_add_cs/iterations:1\n"
+    "BM_atomic_fetch_add_relaxed/iterations:1\n"
+    "BM_atomic_fetch_add_seq_cst/iterations:1\n"
+    "BM_atomic_load_acquire/iterations:1\n"
+    "BM_atomic_load_relaxed/iterations:1\n"
+    "BM_atomic_seq_cst_fence/iterations:1\n"
+    "BM_atomic_store_release/iterations:1\n"
+    "BM_atomic_store_seq_cst/iterations:1\n"
     "BM_math_fabs/0/iterations:1\n"
     "BM_math_fabs/1/iterations:1\n"
     "BM_math_fabs/2/iterations:1\n"
     "BM_math_fabs/3/iterations:1\n"
-    "BM_pthread_self/iterations:1\n"
-    "BM_pthread_getspecific/iterations:1\n"
-    "BM_pthread_setspecific/iterations:1\n"
-    "BM_pthread_once/iterations:1\n"
-    "BM_pthread_mutex_lock/iterations:1\n"
-    "BM_pthread_mutex_lock_ERRORCHECK/iterations:1\n"
-    "BM_pthread_mutex_lock_RECURSIVE/iterations:1\n"
-    "BM_pthread_rwlock_read/iterations:1\n"
-    "BM_pthread_rwlock_write/iterations:1\n"
+    "BM_math_fabs_macro/0/iterations:1\n"
+    "BM_math_fabs_macro/1/iterations:1\n"
+    "BM_math_fabs_macro/2/iterations:1\n"
+    "BM_math_fabs_macro/3/iterations:1\n"
+    "BM_math_fpclassify/0/iterations:1\n"
+    "BM_math_fpclassify/1/iterations:1\n"
+    "BM_math_fpclassify/2/iterations:1\n"
+    "BM_math_fpclassify/3/iterations:1\n"
+    "BM_math_isfinite/0/iterations:1\n"
+    "BM_math_isfinite/1/iterations:1\n"
+    "BM_math_isfinite/2/iterations:1\n"
+    "BM_math_isfinite/3/iterations:1\n"
+    "BM_math_isfinite_macro/0/iterations:1\n"
+    "BM_math_isfinite_macro/1/iterations:1\n"
+    "BM_math_isfinite_macro/2/iterations:1\n"
+    "BM_math_isfinite_macro/3/iterations:1\n"
+    "BM_math_isinf/0/iterations:1\n"
+    "BM_math_isinf/1/iterations:1\n"
+    "BM_math_isinf/2/iterations:1\n"
+    "BM_math_isinf/3/iterations:1\n"
+    "BM_math_isinf_macro/0/iterations:1\n"
+    "BM_math_isinf_macro/1/iterations:1\n"
+    "BM_math_isinf_macro/2/iterations:1\n"
+    "BM_math_isinf_macro/3/iterations:1\n"
+    "BM_math_isnan/0/iterations:1\n"
+    "BM_math_isnan/1/iterations:1\n"
+    "BM_math_isnan/2/iterations:1\n"
+    "BM_math_isnan/3/iterations:1\n"
+    "BM_math_isnan_macro/0/iterations:1\n"
+    "BM_math_isnan_macro/1/iterations:1\n"
+    "BM_math_isnan_macro/2/iterations:1\n"
+    "BM_math_isnan_macro/3/iterations:1\n"
+    "BM_math_isnormal/0/iterations:1\n"
+    "BM_math_isnormal/1/iterations:1\n"
+    "BM_math_isnormal/2/iterations:1\n"
+    "BM_math_isnormal/3/iterations:1\n"
+    "BM_math_isnormal_macro/0/iterations:1\n"
+    "BM_math_isnormal_macro/1/iterations:1\n"
+    "BM_math_isnormal_macro/2/iterations:1\n"
+    "BM_math_isnormal_macro/3/iterations:1\n"
+    "BM_math_log10/iterations:1\n"
+    "BM_math_logb/iterations:1\n"
+    "BM_math_signbit/0/iterations:1\n"
+    "BM_math_signbit/1/iterations:1\n"
+    "BM_math_signbit/2/iterations:1\n"
+    "BM_math_signbit/3/iterations:1\n"
+    "BM_math_signbit_macro/0/iterations:1\n"
+    "BM_math_signbit_macro/1/iterations:1\n"
+    "BM_math_signbit_macro/2/iterations:1\n"
+    "BM_math_signbit_macro/3/iterations:1\n"
+    "BM_math_sin_fast/iterations:1\n"
+    "BM_math_sin_fesetenv/iterations:1\n"
+    "BM_math_sin_feupdateenv/iterations:1\n"
+    "BM_math_sqrt/iterations:1\n"
     "BM_pthread_create/iterations:1\n"
     "BM_pthread_create_and_run/iterations:1\n"
     "BM_pthread_exit_and_join/iterations:1\n"
+    "BM_pthread_getspecific/iterations:1\n"
     "BM_pthread_key_create/iterations:1\n"
     "BM_pthread_key_delete/iterations:1\n"
+    "BM_pthread_mutex_lock/iterations:1\n"
+    "BM_pthread_mutex_lock_ERRORCHECK/iterations:1\n"
+    "BM_pthread_mutex_lock_RECURSIVE/iterations:1\n"
+    "BM_pthread_once/iterations:1\n"
+    "BM_pthread_rwlock_read/iterations:1\n"
+    "BM_pthread_rwlock_write/iterations:1\n"
+    "BM_pthread_self/iterations:1\n"
+    "BM_pthread_setspecific/iterations:1\n"
     "BM_semaphore_sem_getvalue/iterations:1\n"
     "BM_semaphore_sem_wait_sem_post/iterations:1\n"
+    "BM_stdio_fopen_fgetc_fclose_locking/1024/iterations:1\n"
+    "BM_stdio_fopen_fgetc_fclose_no_locking/1024/iterations:1\n"
+    "BM_stdio_fopen_fgetln_fclose_locking/iterations:1\n"
+    "BM_stdio_fopen_fgetln_fclose_no_locking/iterations:1\n"
+    "BM_stdio_fopen_fgets_fclose_locking/iterations:1\n"
+    "BM_stdio_fopen_fgets_fclose_no_locking/iterations:1\n"
+    "BM_stdio_fopen_getline_fclose_locking/iterations:1\n"
+    "BM_stdio_fopen_getline_fclose_no_locking/iterations:1\n"
     "BM_stdio_fread/8/iterations:1\n"
     "BM_stdio_fread/64/iterations:1\n"
     "BM_stdio_fread/512/iterations:1\n"
@@ -258,14 +266,6 @@
     "BM_stdio_fread/16384/iterations:1\n"
     "BM_stdio_fread/32768/iterations:1\n"
     "BM_stdio_fread/65536/iterations:1\n"
-    "BM_stdio_fwrite/8/iterations:1\n"
-    "BM_stdio_fwrite/64/iterations:1\n"
-    "BM_stdio_fwrite/512/iterations:1\n"
-    "BM_stdio_fwrite/1024/iterations:1\n"
-    "BM_stdio_fwrite/8192/iterations:1\n"
-    "BM_stdio_fwrite/16384/iterations:1\n"
-    "BM_stdio_fwrite/32768/iterations:1\n"
-    "BM_stdio_fwrite/65536/iterations:1\n"
     "BM_stdio_fread_unbuffered/8/iterations:1\n"
     "BM_stdio_fread_unbuffered/64/iterations:1\n"
     "BM_stdio_fread_unbuffered/512/iterations:1\n"
@@ -274,6 +274,14 @@
     "BM_stdio_fread_unbuffered/16384/iterations:1\n"
     "BM_stdio_fread_unbuffered/32768/iterations:1\n"
     "BM_stdio_fread_unbuffered/65536/iterations:1\n"
+    "BM_stdio_fwrite/8/iterations:1\n"
+    "BM_stdio_fwrite/64/iterations:1\n"
+    "BM_stdio_fwrite/512/iterations:1\n"
+    "BM_stdio_fwrite/1024/iterations:1\n"
+    "BM_stdio_fwrite/8192/iterations:1\n"
+    "BM_stdio_fwrite/16384/iterations:1\n"
+    "BM_stdio_fwrite/32768/iterations:1\n"
+    "BM_stdio_fwrite/65536/iterations:1\n"
     "BM_stdio_fwrite_unbuffered/8/iterations:1\n"
     "BM_stdio_fwrite_unbuffered/64/iterations:1\n"
     "BM_stdio_fwrite_unbuffered/512/iterations:1\n"
@@ -282,18 +290,20 @@
     "BM_stdio_fwrite_unbuffered/16384/iterations:1\n"
     "BM_stdio_fwrite_unbuffered/32768/iterations:1\n"
     "BM_stdio_fwrite_unbuffered/65536/iterations:1\n"
-    "BM_stdio_fopen_fgetln_fclose_locking/iterations:1\n"
-    "BM_stdio_fopen_fgetln_fclose_no_locking/iterations:1\n"
-    "BM_stdio_fopen_fgets_fclose_locking/iterations:1\n"
-    "BM_stdio_fopen_fgets_fclose_no_locking/iterations:1\n"
-    "BM_stdio_fopen_fgetc_fclose_locking/1024/iterations:1\n"
-    "BM_stdio_fopen_fgetc_fclose_no_locking/1024/iterations:1\n"
-    "BM_stdio_fopen_getline_fclose_locking/iterations:1\n"
-    "BM_stdio_fopen_getline_fclose_no_locking/iterations:1\n"
+    "BM_stdio_printf_1$s/iterations:1\n"
+    "BM_stdio_printf_d/iterations:1\n"
     "BM_stdio_printf_literal/iterations:1\n"
     "BM_stdio_printf_s/iterations:1\n"
-    "BM_stdio_printf_d/iterations:1\n"
-    "BM_stdio_printf_1$s/iterations:1\n"
+    "BM_stdlib_malloc_free/8/iterations:1\n"
+    "BM_stdlib_malloc_free/64/iterations:1\n"
+    "BM_stdlib_malloc_free/512/iterations:1\n"
+    "BM_stdlib_malloc_free/1024/iterations:1\n"
+    "BM_stdlib_malloc_free/8192/iterations:1\n"
+    "BM_stdlib_malloc_free/16384/iterations:1\n"
+    "BM_stdlib_malloc_free/32768/iterations:1\n"
+    "BM_stdlib_malloc_free/65536/iterations:1\n"
+    "BM_stdlib_mbrtowc/0/iterations:1\n"
+    "BM_stdlib_mbstowcs/0/0/iterations:1\n"
     "BM_string_memcmp/8/0/0/iterations:1\n"
     "BM_string_memcmp/64/0/0/iterations:1\n"
     "BM_string_memcmp/512/0/0/iterations:1\n"
@@ -342,14 +352,6 @@
     "BM_string_memset/16384/0/iterations:1\n"
     "BM_string_memset/32768/0/iterations:1\n"
     "BM_string_memset/65536/0/iterations:1\n"
-    "BM_string_strlen/8/0/iterations:1\n"
-    "BM_string_strlen/64/0/iterations:1\n"
-    "BM_string_strlen/512/0/iterations:1\n"
-    "BM_string_strlen/1024/0/iterations:1\n"
-    "BM_string_strlen/8192/0/iterations:1\n"
-    "BM_string_strlen/16384/0/iterations:1\n"
-    "BM_string_strlen/32768/0/iterations:1\n"
-    "BM_string_strlen/65536/0/iterations:1\n"
     "BM_string_strcat_copy_only/8/0/0/iterations:1\n"
     "BM_string_strcat_copy_only/64/0/0/iterations:1\n"
     "BM_string_strcat_copy_only/512/0/0/iterations:1\n"
@@ -358,14 +360,6 @@
     "BM_string_strcat_copy_only/16384/0/0/iterations:1\n"
     "BM_string_strcat_copy_only/32768/0/0/iterations:1\n"
     "BM_string_strcat_copy_only/65536/0/0/iterations:1\n"
-    "BM_string_strcat_seek_only/8/0/0/iterations:1\n"
-    "BM_string_strcat_seek_only/64/0/0/iterations:1\n"
-    "BM_string_strcat_seek_only/512/0/0/iterations:1\n"
-    "BM_string_strcat_seek_only/1024/0/0/iterations:1\n"
-    "BM_string_strcat_seek_only/8192/0/0/iterations:1\n"
-    "BM_string_strcat_seek_only/16384/0/0/iterations:1\n"
-    "BM_string_strcat_seek_only/32768/0/0/iterations:1\n"
-    "BM_string_strcat_seek_only/65536/0/0/iterations:1\n"
     "BM_string_strcat_half_copy_half_seek/8/0/0/iterations:1\n"
     "BM_string_strcat_half_copy_half_seek/64/0/0/iterations:1\n"
     "BM_string_strcat_half_copy_half_seek/512/0/0/iterations:1\n"
@@ -374,30 +368,14 @@
     "BM_string_strcat_half_copy_half_seek/16384/0/0/iterations:1\n"
     "BM_string_strcat_half_copy_half_seek/32768/0/0/iterations:1\n"
     "BM_string_strcat_half_copy_half_seek/65536/0/0/iterations:1\n"
-    "BM_string_strcpy/8/0/0/iterations:1\n"
-    "BM_string_strcpy/64/0/0/iterations:1\n"
-    "BM_string_strcpy/512/0/0/iterations:1\n"
-    "BM_string_strcpy/1024/0/0/iterations:1\n"
-    "BM_string_strcpy/8192/0/0/iterations:1\n"
-    "BM_string_strcpy/16384/0/0/iterations:1\n"
-    "BM_string_strcpy/32768/0/0/iterations:1\n"
-    "BM_string_strcpy/65536/0/0/iterations:1\n"
-    "BM_string_strcmp/8/0/0/iterations:1\n"
-    "BM_string_strcmp/64/0/0/iterations:1\n"
-    "BM_string_strcmp/512/0/0/iterations:1\n"
-    "BM_string_strcmp/1024/0/0/iterations:1\n"
-    "BM_string_strcmp/8192/0/0/iterations:1\n"
-    "BM_string_strcmp/16384/0/0/iterations:1\n"
-    "BM_string_strcmp/32768/0/0/iterations:1\n"
-    "BM_string_strcmp/65536/0/0/iterations:1\n"
-    "BM_string_strstr/8/0/0/iterations:1\n"
-    "BM_string_strstr/64/0/0/iterations:1\n"
-    "BM_string_strstr/512/0/0/iterations:1\n"
-    "BM_string_strstr/1024/0/0/iterations:1\n"
-    "BM_string_strstr/8192/0/0/iterations:1\n"
-    "BM_string_strstr/16384/0/0/iterations:1\n"
-    "BM_string_strstr/32768/0/0/iterations:1\n"
-    "BM_string_strstr/65536/0/0/iterations:1\n"
+    "BM_string_strcat_seek_only/8/0/0/iterations:1\n"
+    "BM_string_strcat_seek_only/64/0/0/iterations:1\n"
+    "BM_string_strcat_seek_only/512/0/0/iterations:1\n"
+    "BM_string_strcat_seek_only/1024/0/0/iterations:1\n"
+    "BM_string_strcat_seek_only/8192/0/0/iterations:1\n"
+    "BM_string_strcat_seek_only/16384/0/0/iterations:1\n"
+    "BM_string_strcat_seek_only/32768/0/0/iterations:1\n"
+    "BM_string_strcat_seek_only/65536/0/0/iterations:1\n"
     "BM_string_strchr/8/0/iterations:1\n"
     "BM_string_strchr/64/0/iterations:1\n"
     "BM_string_strchr/512/0/iterations:1\n"
@@ -406,34 +384,49 @@
     "BM_string_strchr/16384/0/iterations:1\n"
     "BM_string_strchr/32768/0/iterations:1\n"
     "BM_string_strchr/65536/0/iterations:1\n"
+    "BM_string_strcmp/8/0/0/iterations:1\n"
+    "BM_string_strcmp/64/0/0/iterations:1\n"
+    "BM_string_strcmp/512/0/0/iterations:1\n"
+    "BM_string_strcmp/1024/0/0/iterations:1\n"
+    "BM_string_strcmp/8192/0/0/iterations:1\n"
+    "BM_string_strcmp/16384/0/0/iterations:1\n"
+    "BM_string_strcmp/32768/0/0/iterations:1\n"
+    "BM_string_strcmp/65536/0/0/iterations:1\n"
+    "BM_string_strcpy/8/0/0/iterations:1\n"
+    "BM_string_strcpy/64/0/0/iterations:1\n"
+    "BM_string_strcpy/512/0/0/iterations:1\n"
+    "BM_string_strcpy/1024/0/0/iterations:1\n"
+    "BM_string_strcpy/8192/0/0/iterations:1\n"
+    "BM_string_strcpy/16384/0/0/iterations:1\n"
+    "BM_string_strcpy/32768/0/0/iterations:1\n"
+    "BM_string_strcpy/65536/0/0/iterations:1\n"
+    "BM_string_strlen/8/0/iterations:1\n"
+    "BM_string_strlen/64/0/iterations:1\n"
+    "BM_string_strlen/512/0/iterations:1\n"
+    "BM_string_strlen/1024/0/iterations:1\n"
+    "BM_string_strlen/8192/0/iterations:1\n"
+    "BM_string_strlen/16384/0/iterations:1\n"
+    "BM_string_strlen/32768/0/iterations:1\n"
+    "BM_string_strlen/65536/0/iterations:1\n"
+    "BM_string_strstr/8/0/0/iterations:1\n"
+    "BM_string_strstr/64/0/0/iterations:1\n"
+    "BM_string_strstr/512/0/0/iterations:1\n"
+    "BM_string_strstr/1024/0/0/iterations:1\n"
+    "BM_string_strstr/8192/0/0/iterations:1\n"
+    "BM_string_strstr/16384/0/0/iterations:1\n"
+    "BM_string_strstr/32768/0/0/iterations:1\n"
+    "BM_string_strstr/65536/0/0/iterations:1\n"
     "BM_time_clock_gettime/iterations:1\n"
     "BM_time_clock_gettime_syscall/iterations:1\n"
     "BM_time_gettimeofday/iterations:1\n"
     "BM_time_gettimeofday_syscall/iterations:1\n"
-    "BM_time_time/iterations:1\n"
     "BM_time_localtime/iterations:1\n"
     "BM_time_localtime_r/iterations:1\n"
+    "BM_time_time/iterations:1\n"
     "BM_unistd_getpid/iterations:1\n"
     "BM_unistd_getpid_syscall/iterations:1\n"
     "BM_unistd_gettid/iterations:1\n"
     "BM_unistd_gettid_syscall/iterations:1\n"
-    "BM_stdlib_malloc_free/8/0/iterations:1\n"
-    "BM_stdlib_malloc_free/64/0/iterations:1\n"
-    "BM_stdlib_malloc_free/512/0/iterations:1\n"
-    "BM_stdlib_malloc_free/1024/0/iterations:1\n"
-    "BM_stdlib_malloc_free/8192/0/iterations:1\n"
-    "BM_stdlib_malloc_free/16384/0/iterations:1\n"
-    "BM_stdlib_malloc_free/32768/0/iterations:1\n"
-    "BM_stdlib_malloc_free/65536/0/iterations:1\n"
-    "BM_stdlib_mbstowcs/0/0/iterations:1\n"
-    "BM_stdlib_mbrtowc/0/iterations:1\n"
-    "BM_property_get/1/iterations:1\n"
-    "BM_property_get/4/iterations:1\n"
-    "BM_property_get/16/iterations:1\n"
-    "BM_property_get/64/iterations:1\n"
-    "BM_property_get/128/iterations:1\n"
-    "BM_property_get/256/iterations:1\n"
-    "BM_property_get/512/iterations:1\n"
     "BM_property_find/1/iterations:1\n"
     "BM_property_find/4/iterations:1\n"
     "BM_property_find/16/iterations:1\n"
@@ -441,6 +434,13 @@
     "BM_property_find/128/iterations:1\n"
     "BM_property_find/256/iterations:1\n"
     "BM_property_find/512/iterations:1\n"
+    "BM_property_get/1/iterations:1\n"
+    "BM_property_get/4/iterations:1\n"
+    "BM_property_get/16/iterations:1\n"
+    "BM_property_get/64/iterations:1\n"
+    "BM_property_get/128/iterations:1\n"
+    "BM_property_get/256/iterations:1\n"
+    "BM_property_get/512/iterations:1\n"
     "BM_property_read/1/iterations:1\n"
     "BM_property_read/4/iterations:1\n"
     "BM_property_read/16/iterations:1\n"
@@ -458,7 +458,7 @@
   Verify(expected, 0, std::vector<const char*>{"--bionic_iterations=1"});
 
   // Make sure that the test suite can be found in the suites directory.
-  Verify(expected, 0, std::vector<const char*>{"--bionic_iterations=1", "--bionic_xml=full.xml"});
+  Verify(expected, 0, std::vector<const char*>{"--bionic_iterations=1"});
 }
 
 TEST_F(SystemTests, small) {
@@ -489,7 +489,7 @@
 
 TEST_F(SystemTests, from_each) {
   std::string expected =
-    "BM_empty/iterations:1\n"
+    "BM_atomic_empty/iterations:1\n"
     "BM_math_sqrt/iterations:1\n"
     "BM_property_get/1/iterations:1\n"
     "BM_pthread_self/iterations:1\n"
diff --git a/benchmarks/util.h b/benchmarks/util.h
index cf6f50e..a546764 100644
--- a/benchmarks/util.h
+++ b/benchmarks/util.h
@@ -20,17 +20,18 @@
 #include <map>
 #include <mutex>
 #include <string>
+#include <utility>
 #include <vector>
 
 typedef void (*benchmark_func_t) (void);
 
 extern std::mutex g_map_lock;
 
-extern std::map<std::string, benchmark_func_t> g_str_to_func;
+extern std::map<std::string, std::pair<benchmark_func_t, std::string>> g_str_to_func;
 
-static int  __attribute__((unused)) EmplaceBenchmark (std::string fn_name, benchmark_func_t fn_ptr) {
+static int  __attribute__((unused)) EmplaceBenchmark (std::string fn_name, benchmark_func_t fn_ptr, std::string arg = "") {
   g_map_lock.lock();
-  g_str_to_func.emplace(std::string(fn_name), fn_ptr);
+  g_str_to_func.emplace(std::string(fn_name), std::make_pair(fn_ptr, arg));
   g_map_lock.unlock();
   return 0;
 }
@@ -38,6 +39,10 @@
 #define BIONIC_BENCHMARK(n) \
   int _bionic_benchmark_##n __attribute__((unused)) = EmplaceBenchmark(std::string(#n), reinterpret_cast<benchmark_func_t>(n))
 
+#define BIONIC_BENCHMARK_WITH_ARG(n, arg) \
+  int _bionic_benchmark_##n __attribute__((unused)) = EmplaceBenchmark(std::string(#n), reinterpret_cast<benchmark_func_t>(n), arg)
+
+
 constexpr auto KB = 1024;
 
 typedef struct {