<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Jul 9, 2018 at 9:06 PM Eric Fiselier via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ericwf<br>
Date: Mon Jul  9 21:02:00 2018<br>
New Revision: 336635<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=336635&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=336635&view=rev</a><br>
Log:<br>
Update google-benchark to trunk<br>
<br>
Added:<br>
    libcxx/trunk/utils/google-benchmark/cmake/split_list.cmake<br>
    libcxx/trunk/utils/google-benchmark/docs/AssemblyTests.md<br>
    libcxx/trunk/utils/google-benchmark/releasing.md<br>
    libcxx/trunk/utils/google-benchmark/src/benchmark_main.cc<br>
      - copied, changed from r336618, libcxx/trunk/utils/google-benchmark/src/counter.h<br>
    libcxx/trunk/utils/google-benchmark/src/benchmark_register.h<br>
    libcxx/trunk/utils/google-benchmark/src/thread_manager.h<br>
    libcxx/trunk/utils/google-benchmark/src/thread_timer.h<br>
    libcxx/trunk/utils/google-benchmark/test/BUILD<br></blockquote><div><br></div><div>Did you intend to commit this file?</div><div><br></div><div>Just seems odd to have a BUILD file for the test directory but not the rest.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    libcxx/trunk/utils/google-benchmark/test/benchmark_gtest.cc<br>
    libcxx/trunk/utils/google-benchmark/test/clobber_memory_assembly_test.cc<br>
    libcxx/trunk/utils/google-benchmark/test/donotoptimize_assembly_test.cc<br>
    libcxx/trunk/utils/google-benchmark/test/link_main_test.cc<br>
    libcxx/trunk/utils/google-benchmark/test/state_assembly_test.cc<br>
    libcxx/trunk/utils/google-benchmark/test/statistics_gtest.cc<br>
    libcxx/trunk/utils/google-benchmark/test/string_util_gtest.cc<br>
    libcxx/trunk/utils/google-benchmark/tools/gbench/Inputs/test3_run0.json<br>
    libcxx/trunk/utils/google-benchmark/tools/gbench/Inputs/test3_run1.json<br>
    libcxx/trunk/utils/google-benchmark/tools/strip_asm.py   (with props)<br>
Removed:<br>
    libcxx/trunk/utils/google-benchmark/test/statistics_test.cc<br>
Modified:<br>
    libcxx/trunk/utils/google-benchmark/AUTHORS<br>
    libcxx/trunk/utils/google-benchmark/CMakeLists.txt<br>
    libcxx/trunk/utils/google-benchmark/CONTRIBUTORS<br>
    libcxx/trunk/utils/google-benchmark/README.md<br>
    libcxx/trunk/utils/google-benchmark/cmake/AddCXXCompilerFlag.cmake<br>
    libcxx/trunk/utils/google-benchmark/cmake/CXXFeatureCheck.cmake<br>
    libcxx/trunk/utils/google-benchmark/cmake/GetGitVersion.cmake<br>
    libcxx/trunk/utils/google-benchmark/cmake/HandleGTest.cmake<br>
    libcxx/trunk/utils/google-benchmark/include/benchmark/benchmark.h<br>
    libcxx/trunk/utils/google-benchmark/src/CMakeLists.txt<br>
    libcxx/trunk/utils/google-benchmark/src/benchmark.cc<br>
    libcxx/trunk/utils/google-benchmark/src/benchmark_api_internal.h<br>
    libcxx/trunk/utils/google-benchmark/src/benchmark_register.cc<br>
    libcxx/trunk/utils/google-benchmark/src/check.h<br>
    libcxx/trunk/utils/google-benchmark/src/commandlineflags.cc<br>
    libcxx/trunk/utils/google-benchmark/src/complexity.cc<br>
    libcxx/trunk/utils/google-benchmark/src/counter.cc<br>
    libcxx/trunk/utils/google-benchmark/src/counter.h<br>
    libcxx/trunk/utils/google-benchmark/src/csv_reporter.cc<br>
    libcxx/trunk/utils/google-benchmark/src/cycleclock.h<br>
    libcxx/trunk/utils/google-benchmark/src/internal_macros.h<br>
    libcxx/trunk/utils/google-benchmark/src/json_reporter.cc<br>
    libcxx/trunk/utils/google-benchmark/src/log.h<br>
    libcxx/trunk/utils/google-benchmark/src/re.h<br>
    libcxx/trunk/utils/google-benchmark/src/reporter.cc<br>
    libcxx/trunk/utils/google-benchmark/src/statistics.cc<br>
    libcxx/trunk/utils/google-benchmark/src/string_util.cc<br>
    libcxx/trunk/utils/google-benchmark/src/string_util.h<br>
    libcxx/trunk/utils/google-benchmark/src/sysinfo.cc<br>
    libcxx/trunk/utils/google-benchmark/src/timers.cc<br>
    libcxx/trunk/utils/google-benchmark/test/CMakeLists.txt<br>
    libcxx/trunk/utils/google-benchmark/test/basic_test.cc<br>
    libcxx/trunk/utils/google-benchmark/test/benchmark_test.cc<br>
    libcxx/trunk/utils/google-benchmark/test/complexity_test.cc<br>
    libcxx/trunk/utils/google-benchmark/test/donotoptimize_test.cc<br>
    libcxx/trunk/utils/google-benchmark/test/map_test.cc<br>
    libcxx/trunk/utils/google-benchmark/test/multiple_ranges_test.cc<br>
    libcxx/trunk/utils/google-benchmark/test/output_test.h<br>
    libcxx/trunk/utils/google-benchmark/test/output_test_helper.cc<br>
    libcxx/trunk/utils/google-benchmark/test/register_benchmark_test.cc<br>
    libcxx/trunk/utils/google-benchmark/test/reporter_output_test.cc<br>
    libcxx/trunk/utils/google-benchmark/test/skip_with_error_test.cc<br>
    libcxx/trunk/utils/google-benchmark/test/templated_fixture_test.cc<br>
    libcxx/trunk/utils/google-benchmark/test/user_counters_tabular_test.cc<br>
    libcxx/trunk/utils/google-benchmark/test/user_counters_test.cc<br>
    libcxx/trunk/utils/google-benchmark/tools/compare.py<br>
    libcxx/trunk/utils/google-benchmark/tools/gbench/report.py<br>
<br>
Modified: libcxx/trunk/utils/google-benchmark/AUTHORS<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/AUTHORS?rev=336635&r1=336634&r2=336635&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/AUTHORS?rev=336635&r1=336634&r2=336635&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/utils/google-benchmark/AUTHORS (original)<br>
+++ libcxx/trunk/utils/google-benchmark/AUTHORS Mon Jul  9 21:02:00 2018<br>
@@ -13,11 +13,13 @@ Arne Beer <<a href="mailto:arne@twobeer.de" target="_blank">arne@twobeer.de</a>><br>
 Carto<br>
 Christopher Seymour <<a href="mailto:chris.j.seymour@hotmail.com" target="_blank">chris.j.seymour@hotmail.com</a>><br>
 David Coeurjolly <<a href="mailto:david.coeurjolly@liris.cnrs.fr" target="_blank">david.coeurjolly@liris.cnrs.fr</a>><br>
+Deniz Evrenci <<a href="mailto:denizevrenci@gmail.com" target="_blank">denizevrenci@gmail.com</a>><br>
 Dirac Research <br>
 Dominik Czarnota <<a href="mailto:dominik.b.czarnota@gmail.com" target="_blank">dominik.b.czarnota@gmail.com</a>><br>
 Eric Fiselier <<a href="mailto:eric@efcs.ca" target="_blank">eric@efcs.ca</a>><br>
 Eugene Zhuk <<a href="mailto:eugene.zhuk@gmail.com" target="_blank">eugene.zhuk@gmail.com</a>><br>
 Evgeny Safronov <<a href="mailto:division494@gmail.com" target="_blank">division494@gmail.com</a>><br>
+Federico Ficarelli <<a href="mailto:federico.ficarelli@gmail.com" target="_blank">federico.ficarelli@gmail.com</a>><br>
 Felix Homann <<a href="mailto:linuxaudio@showlabor.de" target="_blank">linuxaudio@showlabor.de</a>><br>
 Google Inc.<br>
 International Business Machines Corporation<br>
@@ -31,6 +33,7 @@ Kishan Kumar <<a href="mailto:kumar.kishan@outlook.com" target="_blank">kumar.kishan@outlook.com</a>><br>
 Lei Xu <<a href="mailto:eddyxu@gmail.com" target="_blank">eddyxu@gmail.com</a>><br>
 Matt Clarkson <<a href="mailto:mattyclarkson@gmail.com" target="_blank">mattyclarkson@gmail.com</a>><br>
 Maxim Vafin <<a href="mailto:maxvafin@gmail.com" target="_blank">maxvafin@gmail.com</a>><br>
+MongoDB Inc.<br>
 Nick Hutchinson <<a href="mailto:nshutchinson@gmail.com" target="_blank">nshutchinson@gmail.com</a>><br>
 Oleksandr Sochka <<a href="mailto:sasha.sochka@gmail.com" target="_blank">sasha.sochka@gmail.com</a>><br>
 Paul Redmond <<a href="mailto:paul.redmond@gmail.com" target="_blank">paul.redmond@gmail.com</a>><br>
@@ -38,6 +41,7 @@ Radoslav Yovchev <<a href="mailto:radoslav.tm@gmail.com" target="_blank">radoslav.tm@gmail.com</a>><br>
 Roman Lebedev <<a href="mailto:lebedev.ri@gmail.com" target="_blank">lebedev.ri@gmail.com</a>><br>
 Shuo Chen <<a href="mailto:chenshuo@chenshuo.com" target="_blank">chenshuo@chenshuo.com</a>><br>
 Steinar H. Gunderson <<a href="mailto:sgunderson@bigfoot.com" target="_blank">sgunderson@bigfoot.com</a>><br>
+Stripe, Inc.<br>
 Yixuan Qiu <<a href="mailto:yixuanq@gmail.com" target="_blank">yixuanq@gmail.com</a>><br>
 Yusuke Suzuki <<a href="mailto:utatane.tea@gmail.com" target="_blank">utatane.tea@gmail.com</a>><br>
 Zbigniew Skowron <<a href="mailto:zbychs@gmail.com" target="_blank">zbychs@gmail.com</a>><br>
<br>
Modified: libcxx/trunk/utils/google-benchmark/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/CMakeLists.txt?rev=336635&r1=336634&r2=336635&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/CMakeLists.txt?rev=336635&r1=336634&r2=336635&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/utils/google-benchmark/CMakeLists.txt (original)<br>
+++ libcxx/trunk/utils/google-benchmark/CMakeLists.txt Mon Jul  9 21:02:00 2018<br>
@@ -27,10 +27,48 @@ option(BENCHMARK_DOWNLOAD_DEPENDENCIES "<br>
 # in cases where it is not possible to build or find a valid version of gtest.<br>
 option(BENCHMARK_ENABLE_GTEST_TESTS "Enable building the unit tests which depend on gtest" ON)<br>
<br>
+set(ENABLE_ASSEMBLY_TESTS_DEFAULT OFF)<br>
+function(should_enable_assembly_tests)<br>
+  if(CMAKE_BUILD_TYPE)<br>
+    string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)<br>
+    if (${CMAKE_BUILD_TYPE_LOWER} MATCHES "coverage")<br>
+      # FIXME: The --coverage flag needs to be removed when building assembly<br>
+      # tests for this to work.<br>
+      return()<br>
+    endif()<br>
+  endif()<br>
+  if (MSVC)<br>
+    return()<br>
+  elseif(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")<br>
+    return()<br>
+  elseif(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)<br>
+    # FIXME: Make these work on 32 bit builds<br>
+    return()<br>
+  elseif(BENCHMARK_BUILD_32_BITS)<br>
+     # FIXME: Make these work on 32 bit builds<br>
+    return()<br>
+  endif()<br>
+  find_program(LLVM_FILECHECK_EXE FileCheck)<br>
+  if (LLVM_FILECHECK_EXE)<br>
+    set(LLVM_FILECHECK_EXE "${LLVM_FILECHECK_EXE}" CACHE PATH "llvm filecheck" FORCE)<br>
+    message(STATUS "LLVM FileCheck Found: ${LLVM_FILECHECK_EXE}")<br>
+  else()<br>
+    message(STATUS "Failed to find LLVM FileCheck")<br>
+    return()<br>
+  endif()<br>
+  set(ENABLE_ASSEMBLY_TESTS_DEFAULT ON PARENT_SCOPE)<br>
+endfunction()<br>
+should_enable_assembly_tests()<br>
+<br>
+# This option disables the building and running of the assembly verification tests<br>
+option(BENCHMARK_ENABLE_ASSEMBLY_TESTS "Enable building and running the assembly tests"<br>
+    ${ENABLE_ASSEMBLY_TESTS_DEFAULT})<br>
+<br>
 # Make sure we can import out CMake functions<br>
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")<br>
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")<br>
<br>
+<br>
 # Read the git tags to determine the project version<br>
 include(GetGitVersion)<br>
 get_git_version(GIT_VERSION)<br>
@@ -92,7 +130,6 @@ else()<br>
<br>
   # Turn compiler warnings up to 11<br>
   add_cxx_compiler_flag(-Wall)<br>
-<br>
   add_cxx_compiler_flag(-Wextra)<br>
   add_cxx_compiler_flag(-Wshadow)<br>
   add_cxx_compiler_flag(-Werror RELEASE)<br>
@@ -101,8 +138,20 @@ else()<br>
   add_cxx_compiler_flag(-pedantic)<br>
   add_cxx_compiler_flag(-pedantic-errors)<br>
   add_cxx_compiler_flag(-Wshorten-64-to-32)<br>
-  add_cxx_compiler_flag(-Wfloat-equal)<br>
   add_cxx_compiler_flag(-fstrict-aliasing)<br>
+  # Disable warnings regarding deprecated parts of the library while building<br>
+  # and testing those parts of the library.<br>
+  add_cxx_compiler_flag(-Wno-deprecated-declarations)<br>
+  if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")<br>
+    # Intel silently ignores '-Wno-deprecated-declarations',<br>
+    # warning no. 1786 must be explicitly disabled.<br>
+    # See #631 for rationale.<br>
+    add_cxx_compiler_flag(-wd1786)<br>
+  endif()<br>
+  # Disable deprecation warnings for release builds (when -Werror is enabled).<br>
+  add_cxx_compiler_flag(-Wno-deprecated RELEASE)<br>
+  add_cxx_compiler_flag(-Wno-deprecated RELWITHDEBINFO)<br>
+  add_cxx_compiler_flag(-Wno-deprecated MINSIZEREL)<br>
   if (NOT BENCHMARK_ENABLE_EXCEPTIONS)<br>
     add_cxx_compiler_flag(-fno-exceptions)<br>
   endif()<br>
@@ -178,7 +227,7 @@ if (BENCHMARK_USE_LIBCXX)<br>
     # linker flags appear before all linker inputs and -lc++ must appear after.<br>
     list(APPEND BENCHMARK_CXX_LIBRARIES c++)<br>
   else()<br>
-    message(FATAL "-DBENCHMARK_USE_LIBCXX:BOOL=ON is not supported for compiler")<br>
+    message(FATAL_ERROR "-DBENCHMARK_USE_LIBCXX:BOOL=ON is not supported for compiler")<br>
   endif()<br>
 endif(BENCHMARK_USE_LIBCXX)<br>
<br>
<br>
Modified: libcxx/trunk/utils/google-benchmark/CONTRIBUTORS<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/CONTRIBUTORS?rev=336635&r1=336634&r2=336635&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/CONTRIBUTORS?rev=336635&r1=336634&r2=336635&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/utils/google-benchmark/CONTRIBUTORS (original)<br>
+++ libcxx/trunk/utils/google-benchmark/CONTRIBUTORS Mon Jul  9 21:02:00 2018<br>
@@ -28,16 +28,19 @@ Billy Robert O'Neal III <billy.oneal@gma<br>
 Chris Kennelly <<a href="mailto:ckennelly@google.com" target="_blank">ckennelly@google.com</a>> <<a href="mailto:ckennelly@ckennelly.com" target="_blank">ckennelly@ckennelly.com</a>><br>
 Christopher Seymour <<a href="mailto:chris.j.seymour@hotmail.com" target="_blank">chris.j.seymour@hotmail.com</a>><br>
 David Coeurjolly <<a href="mailto:david.coeurjolly@liris.cnrs.fr" target="_blank">david.coeurjolly@liris.cnrs.fr</a>><br>
+Deniz Evrenci <<a href="mailto:denizevrenci@gmail.com" target="_blank">denizevrenci@gmail.com</a>><br>
 Dominic Hamon <<a href="mailto:dma@stripysock.com" target="_blank">dma@stripysock.com</a>> <<a href="mailto:dominic@google.com" target="_blank">dominic@google.com</a>><br>
 Dominik Czarnota <<a href="mailto:dominik.b.czarnota@gmail.com" target="_blank">dominik.b.czarnota@gmail.com</a>><br>
 Eric Fiselier <<a href="mailto:eric@efcs.ca" target="_blank">eric@efcs.ca</a>><br>
 Eugene Zhuk <<a href="mailto:eugene.zhuk@gmail.com" target="_blank">eugene.zhuk@gmail.com</a>><br>
 Evgeny Safronov <<a href="mailto:division494@gmail.com" target="_blank">division494@gmail.com</a>><br>
+Federico Ficarelli <<a href="mailto:federico.ficarelli@gmail.com" target="_blank">federico.ficarelli@gmail.com</a>><br>
 Felix Homann <<a href="mailto:linuxaudio@showlabor.de" target="_blank">linuxaudio@showlabor.de</a>><br>
 Ismael Jimenez Martinez <<a href="mailto:ismael.jimenez.martinez@gmail.com" target="_blank">ismael.jimenez.martinez@gmail.com</a>><br>
 Jern-Kuan Leong <<a href="mailto:jernkuan@gmail.com" target="_blank">jernkuan@gmail.com</a>><br>
 JianXiong Zhou <<a href="mailto:zhoujianxiong2@gmail.com" target="_blank">zhoujianxiong2@gmail.com</a>><br>
 Joao Paulo Magalhaes <<a href="mailto:joaoppmagalhaes@gmail.com" target="_blank">joaoppmagalhaes@gmail.com</a>><br>
+John Millikin <<a href="mailto:jmillikin@stripe.com" target="_blank">jmillikin@stripe.com</a>><br>
 Jussi Knuuttila <<a href="mailto:jussi.knuuttila@gmail.com" target="_blank">jussi.knuuttila@gmail.com</a>><br>
 Kai Wolf <<a href="mailto:kai.wolf@gmail.com" target="_blank">kai.wolf@gmail.com</a>><br>
 Kishan Kumar <<a href="mailto:kumar.kishan@outlook.com" target="_blank">kumar.kishan@outlook.com</a>><br>
@@ -53,6 +56,7 @@ Pierre Phaneuf <<a href="mailto:pphaneuf@google.com" target="_blank">pphaneuf@google.com</a>><br>
 Radoslav Yovchev <<a href="mailto:radoslav.tm@gmail.com" target="_blank">radoslav.tm@gmail.com</a>><br>
 Raul Marin <<a href="mailto:rmrodriguez@cartodb.com" target="_blank">rmrodriguez@cartodb.com</a>><br>
 Ray Glover <<a href="mailto:ray.glover@uk.ibm.com" target="_blank">ray.glover@uk.ibm.com</a>><br>
+Robert Guo <<a href="mailto:robert.guo@mongodb.com" target="_blank">robert.guo@mongodb.com</a>><br>
 Roman Lebedev <<a href="mailto:lebedev.ri@gmail.com" target="_blank">lebedev.ri@gmail.com</a>><br>
 Shuo Chen <<a href="mailto:chenshuo@chenshuo.com" target="_blank">chenshuo@chenshuo.com</a>><br>
 Tobias UlvgÃ¥rd <<a href="mailto:tobias.ulvgard@dirac.se" target="_blank">tobias.ulvgard@dirac.se</a>><br>
<br>
Modified: libcxx/trunk/utils/google-benchmark/README.md<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/README.md?rev=336635&r1=336634&r2=336635&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/README.md?rev=336635&r1=336634&r2=336635&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/utils/google-benchmark/README.md (original)<br>
+++ libcxx/trunk/utils/google-benchmark/README.md Mon Jul  9 21:02:00 2018<br>
@@ -14,6 +14,8 @@ IRC channel: <a href="https://freenode.net" rel="noreferrer" target="_blank">https://freenode.net</a> #googl<br>
<br>
 [Additional Tooling Documentation](docs/tools.md)<br>
<br>
+[Assembly Testing Documentation](docs/AssemblyTests.md)<br>
+<br>
<br>
 ## Building<br>
<br>
@@ -21,7 +23,7 @@ The basic steps for configuring and buil<br>
<br>
 ```bash<br>
 $ git clone <a href="https://github.com/google/benchmark.git" rel="noreferrer" target="_blank">https://github.com/google/benchmark.git</a><br>
-# Benchmark requires GTest as a dependency. Add the source tree as a subdirectory.<br>
+# Benchmark requires Google Test as a dependency. Add the source tree as a subdirectory.<br>
 $ git clone <a href="https://github.com/google/googletest.git" rel="noreferrer" target="_blank">https://github.com/google/googletest.git</a> benchmark/googletest<br>
 $ mkdir build && cd build<br>
 $ cmake -G <generator> [options] ../benchmark<br>
@@ -29,15 +31,13 @@ $ cmake -G <generator> [options] ../benc<br>
 $ make<br>
 ```<br>
<br>
-Note that Google Benchmark requires GTest to build and run the tests. This<br>
-dependency can be provided three ways:<br>
+Note that Google Benchmark requires Google Test to build and run the tests. This<br>
+dependency can be provided two ways:<br>
<br>
-* Checkout the GTest sources into `benchmark/googletest`.<br>
+* Checkout the Google Test sources into `benchmark/googletest` as above.<br>
 * Otherwise, if `-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON` is specified during<br>
   configuration, the library will automatically download and build any required<br>
   dependencies.<br>
-* Otherwise, if nothing is done, CMake will use `find_package(GTest REQUIRED)`<br>
-  to resolve the required GTest dependency.<br>
<br>
 If you do not wish to build and run the tests, add `-DBENCHMARK_ENABLE_GTEST_TESTS=OFF`<br>
 to `CMAKE_ARGS`.<br>
@@ -59,6 +59,7 @@ Now, let's clone the repository and buil<br>
 ```<br>
 git clone <a href="https://github.com/google/benchmark.git" rel="noreferrer" target="_blank">https://github.com/google/benchmark.git</a><br>
 cd benchmark<br>
+git clone <a href="https://github.com/google/googletest.git" rel="noreferrer" target="_blank">https://github.com/google/googletest.git</a><br>
 mkdir build<br>
 cd build<br>
 cmake .. -DCMAKE_BUILD_TYPE=RELEASE<br>
@@ -71,7 +72,7 @@ We need to install the library globally<br>
 sudo make install<br>
 ```<br>
<br>
-Now you have google/benchmark installed in your machine <br>
+Now you have google/benchmark installed in your machine<br>
 Note: Don't forget to link to pthread library while building<br>
<br>
 ## Stable and Experimental Library Versions<br>
@@ -86,6 +87,11 @@ to use, test, and provide feedback on th<br>
 this branch. However, this branch provides no stability guarantees and reserves<br>
 the right to change and break the API at any time.<br>
<br>
+## Prerequisite knowledge<br>
+<br>
+Before attempting to understand this framework one should ideally have some familiarity with the structure and format of the Google Test framework, upon which it is based. Documentation for Google Test, including a "Getting Started" (primer) guide, is available here:<br>
+<a href="https://github.com/google/googletest/blob/master/googletest/docs/primer.md" rel="noreferrer" target="_blank">https://github.com/google/googletest/blob/master/googletest/docs/primer.md</a><br>
+<br>
<br>
 ## Example usage<br>
 ### Basic usage<br>
@@ -112,7 +118,10 @@ BENCHMARK(BM_StringCopy);<br>
 BENCHMARK_MAIN();<br>
 ```<br>
<br>
-Don't forget to inform your linker to add benchmark library e.g. through `-lbenchmark` compilation flag.<br>
+Don't forget to inform your linker to add benchmark library e.g. through <br>
+`-lbenchmark` compilation flag. Alternatively, you may leave out the <br>
+`BENCHMARK_MAIN();` at the end of the source file and link against <br>
+`-lbenchmark_main` to get the same default behavior.<br>
<br>
 The benchmark library will reporting the timing for the code within the `for(...)` loop.<br>
<br>
@@ -821,7 +830,7 @@ BM_SetInsert/1024/10<br>
 The JSON format outputs human readable json split into two top level attributes.<br>
 The `context` attribute contains information about the run in general, including<br>
 information about the CPU and the date.<br>
-The `benchmarks` attribute contains a list of ever benchmark run. Example json<br>
+The `benchmarks` attribute contains a list of every benchmark run. Example json<br>
 output looks like:<br>
 ```json<br>
 {<br>
@@ -893,8 +902,11 @@ If you are using gcc, you might need to<br>
 If you are using clang, you may need to set `LLVMAR_EXECUTABLE`, `LLVMNM_EXECUTABLE` and `LLVMRANLIB_EXECUTABLE` cmake cache variables.<br>
<br>
 ## Linking against the library<br>
-When using gcc, it is necessary to link against pthread to avoid runtime exceptions.<br>
-This is due to how gcc implements std::thread.<br>
+<br>
+When the library is built using GCC it is necessary to link with `-pthread`,<br>
+due to how GCC implements `std::thread`.<br>
+<br>
+For GCC 4.x failing to link to pthreads will lead to runtime exceptions, not linker errors.<br>
 See [issue #67](<a href="https://github.com/google/benchmark/issues/67" rel="noreferrer" target="_blank">https://github.com/google/benchmark/issues/67</a>) for more details.<br>
<br>
 ## Compiler Support<br>
@@ -928,8 +940,11 @@ sudo cpupower frequency-set --governor p<br>
<br>
 # Known Issues<br>
<br>
-### Windows<br>
+### Windows with CMake<br>
<br>
 * Users must manually link `shlwapi.lib`. Failure to do so may result<br>
 in unresolved symbols.<br>
<br>
+### Solaris<br>
+<br>
+* Users must explicitly link with kstat library (-lkstat compilation flag).<br>
<br>
Modified: libcxx/trunk/utils/google-benchmark/cmake/AddCXXCompilerFlag.cmake<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/cmake/AddCXXCompilerFlag.cmake?rev=336635&r1=336634&r2=336635&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/cmake/AddCXXCompilerFlag.cmake?rev=336635&r1=336634&r2=336635&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/utils/google-benchmark/cmake/AddCXXCompilerFlag.cmake (original)<br>
+++ libcxx/trunk/utils/google-benchmark/cmake/AddCXXCompilerFlag.cmake Mon Jul  9 21:02:00 2018<br>
@@ -62,3 +62,13 @@ function(add_required_cxx_compiler_flag<br>
     message(FATAL_ERROR "Required flag '${FLAG}' is not supported by the compiler")<br>
   endif()<br>
 endfunction()<br>
+<br>
+function(check_cxx_warning_flag FLAG)<br>
+  mangle_compiler_flag("${FLAG}" MANGLED_FLAG)<br>
+  set(OLD_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")<br>
+  # Add -Werror to ensure the compiler generates an error if the warning flag<br>
+  # doesn't exist.<br>
+  set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror ${FLAG}")<br>
+  check_cxx_compiler_flag("${FLAG}" ${MANGLED_FLAG})<br>
+  set(CMAKE_REQUIRED_FLAGS "${OLD_CMAKE_REQUIRED_FLAGS}")<br>
+endfunction()<br>
<br>
Modified: libcxx/trunk/utils/google-benchmark/cmake/CXXFeatureCheck.cmake<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/cmake/CXXFeatureCheck.cmake?rev=336635&r1=336634&r2=336635&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/cmake/CXXFeatureCheck.cmake?rev=336635&r1=336634&r2=336635&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/utils/google-benchmark/cmake/CXXFeatureCheck.cmake (original)<br>
+++ libcxx/trunk/utils/google-benchmark/cmake/CXXFeatureCheck.cmake Mon Jul  9 21:02:00 2018<br>
@@ -27,25 +27,27 @@ function(cxx_feature_check FILE)<br>
     return()<br>
   endif()<br>
<br>
-  message("-- Performing Test ${FEATURE}")<br>
-  if(CMAKE_CROSSCOMPILING)<br>
-    try_compile(COMPILE_${FEATURE}<br>
-            ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${FILE}.cpp<br>
-            CMAKE_FLAGS ${BENCHMARK_CXX_LINKER_FLAGS}<br>
-            LINK_LIBRARIES ${BENCHMARK_CXX_LIBRARIES})<br>
-    if(COMPILE_${FEATURE})<br>
-      message(WARNING<br>
-            "If you see build failures due to cross compilation, try setting HAVE_${VAR} to 0")<br>
-      set(RUN_${FEATURE} 0)<br>
+  if (NOT DEFINED COMPILE_${FEATURE})<br>
+    message("-- Performing Test ${FEATURE}")<br>
+    if(CMAKE_CROSSCOMPILING)<br>
+      try_compile(COMPILE_${FEATURE}<br>
+              ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${FILE}.cpp<br>
+              CMAKE_FLAGS ${BENCHMARK_CXX_LINKER_FLAGS}<br>
+              LINK_LIBRARIES ${BENCHMARK_CXX_LIBRARIES})<br>
+      if(COMPILE_${FEATURE})<br>
+        message(WARNING<br>
+              "If you see build failures due to cross compilation, try setting HAVE_${VAR} to 0")<br>
+        set(RUN_${FEATURE} 0)<br>
+      else()<br>
+        set(RUN_${FEATURE} 1)<br>
+      endif()<br>
     else()<br>
-      set(RUN_${FEATURE} 1)<br>
+      message("-- Performing Test ${FEATURE}")<br>
+      try_run(RUN_${FEATURE} COMPILE_${FEATURE}<br>
+              ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${FILE}.cpp<br>
+              CMAKE_FLAGS ${BENCHMARK_CXX_LINKER_FLAGS}<br>
+              LINK_LIBRARIES ${BENCHMARK_CXX_LIBRARIES})<br>
     endif()<br>
-  else()<br>
-    message("-- Performing Test ${FEATURE}")<br>
-    try_run(RUN_${FEATURE} COMPILE_${FEATURE}<br>
-            ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${FILE}.cpp<br>
-            CMAKE_FLAGS ${BENCHMARK_CXX_LINKER_FLAGS}<br>
-            LINK_LIBRARIES ${BENCHMARK_CXX_LIBRARIES})<br>
   endif()<br>
<br>
   if(RUN_${FEATURE} EQUAL 0)<br>
<br>
Modified: libcxx/trunk/utils/google-benchmark/cmake/GetGitVersion.cmake<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/cmake/GetGitVersion.cmake?rev=336635&r1=336634&r2=336635&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/cmake/GetGitVersion.cmake?rev=336635&r1=336634&r2=336635&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/utils/google-benchmark/cmake/GetGitVersion.cmake (original)<br>
+++ libcxx/trunk/utils/google-benchmark/cmake/GetGitVersion.cmake Mon Jul  9 21:02:00 2018<br>
@@ -21,6 +21,7 @@ set(__get_git_version INCLUDED)<br>
 function(get_git_version var)<br>
   if(GIT_EXECUTABLE)<br>
       execute_process(COMMAND ${GIT_EXECUTABLE} describe --match "v[0-9]*.[0-9]*.[0-9]*" --abbrev=8<br>
+          WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}<br>
           RESULT_VARIABLE status<br>
           OUTPUT_VARIABLE GIT_VERSION<br>
           ERROR_QUIET)<br>
@@ -33,9 +34,11 @@ function(get_git_version var)<br>
<br>
       # Work out if the repository is dirty<br>
       execute_process(COMMAND ${GIT_EXECUTABLE} update-index -q --refresh<br>
+          WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}<br>
           OUTPUT_QUIET<br>
           ERROR_QUIET)<br>
       execute_process(COMMAND ${GIT_EXECUTABLE} diff-index --name-only HEAD --<br>
+          WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}<br>
           OUTPUT_VARIABLE GIT_DIFF_INDEX<br>
           ERROR_QUIET)<br>
       string(COMPARE NOTEQUAL "${GIT_DIFF_INDEX}" "" GIT_DIRTY)<br>
<br>
Modified: libcxx/trunk/utils/google-benchmark/cmake/HandleGTest.cmake<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/cmake/HandleGTest.cmake?rev=336635&r1=336634&r2=336635&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/cmake/HandleGTest.cmake?rev=336635&r1=336634&r2=336635&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/utils/google-benchmark/cmake/HandleGTest.cmake (original)<br>
+++ libcxx/trunk/utils/google-benchmark/cmake/HandleGTest.cmake Mon Jul  9 21:02:00 2018<br>
@@ -1,7 +1,5 @@<br>
<br>
-macro(split_list listname)<br>
-  string(REPLACE ";" " " ${listname} "${${listname}}")<br>
-endmacro()<br>
+include(split_list)<br>
<br>
 macro(build_external_gtest)<br>
   include(ExternalProject)<br>
@@ -23,9 +21,22 @@ macro(build_external_gtest)<br>
   if ("${GTEST_BUILD_TYPE}" STREQUAL "COVERAGE")<br>
     set(GTEST_BUILD_TYPE "DEBUG")<br>
   endif()<br>
+  # FIXME: Since 10/Feb/2017 the googletest trunk has had a bug where<br>
+  # -Werror=unused-function fires during the build on OS X. This is a temporary<br>
+  # workaround to keep our travis bots from failing. It should be removed<br>
+  # once gtest is fixed.<br>
+  if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")<br>
+    list(APPEND GTEST_FLAGS "-Wno-unused-function")<br>
+  endif()<br>
   split_list(GTEST_FLAGS)<br>
+  set(EXCLUDE_FROM_ALL_OPT "")<br>
+  set(EXCLUDE_FROM_ALL_VALUE "")<br>
+  if (${CMAKE_VERSION} VERSION_GREATER "3.0.99")<br>
+      set(EXCLUDE_FROM_ALL_OPT "EXCLUDE_FROM_ALL")<br>
+      set(EXCLUDE_FROM_ALL_VALUE "ON")<br>
+  endif()<br>
   ExternalProject_Add(googletest<br>
-      EXCLUDE_FROM_ALL ON<br>
+      ${EXCLUDE_FROM_ALL_OPT} ${EXCLUDE_FROM_ALL_VALUE}<br>
       GIT_REPOSITORY <a href="https://github.com/google/googletest.git" rel="noreferrer" target="_blank">https://github.com/google/googletest.git</a><br>
       GIT_TAG master<br>
       PREFIX "${CMAKE_BINARY_DIR}/googletest"<br>
@@ -35,45 +46,68 @@ macro(build_external_gtest)<br>
         -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}<br>
         -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}<br>
         -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR><br>
+        -DCMAKE_INSTALL_LIBDIR:PATH=<INSTALL_DIR>/lib<br>
         -DCMAKE_CXX_FLAGS:STRING=${GTEST_FLAGS}<br>
         -Dgtest_force_shared_crt:BOOL=ON<br>
       )<br>
<br>
   ExternalProject_Get_Property(googletest install_dir)<br>
-<br>
-  add_library(gtest UNKNOWN IMPORTED)<br>
-  add_library(gtest_main UNKNOWN IMPORTED)<br>
+  set(GTEST_INCLUDE_DIRS ${install_dir}/include)<br>
+  file(MAKE_DIRECTORY ${GTEST_INCLUDE_DIRS})<br>
<br>
   set(LIB_SUFFIX "${CMAKE_STATIC_LIBRARY_SUFFIX}")<br>
   set(LIB_PREFIX "${CMAKE_STATIC_LIBRARY_PREFIX}")<br>
-<br>
   if("${GTEST_BUILD_TYPE}" STREQUAL "DEBUG")<br>
     set(LIB_SUFFIX "d${CMAKE_STATIC_LIBRARY_SUFFIX}")<br>
   endif()<br>
-  file(MAKE_DIRECTORY ${install_dir}/include)<br>
-  set_target_properties(gtest PROPERTIES<br>
-    IMPORTED_LOCATION ${install_dir}/lib/${LIB_PREFIX}gtest${LIB_SUFFIX}<br>
-    INTERFACE_INCLUDE_DIRECTORIES ${install_dir}/include<br>
-  )<br>
-  set_target_properties(gtest_main PROPERTIES<br>
-    IMPORTED_LOCATION ${install_dir}/lib/${LIB_PREFIX}gtest_main${LIB_SUFFIX}<br>
-    INTERFACE_INCLUDE_DIRECTORIES ${install_dir}/include<br>
-  )<br>
-  add_dependencies(gtest googletest)<br>
-  add_dependencies(gtest_main googletest)<br>
-  set(GTEST_BOTH_LIBRARIES gtest gtest_main)<br>
-  #set(GTEST_INCLUDE_DIRS ${install_dir}/include)<br>
+<br>
+  # Use gmock_main instead of gtest_main because it initializes gtest as well.<br>
+  # Note: The libraries are listed in reverse order of their dependancies.<br>
+  foreach(LIB gtest gmock gmock_main)<br>
+    add_library(${LIB} UNKNOWN IMPORTED)<br>
+    set_target_properties(${LIB} PROPERTIES<br>
+      IMPORTED_LOCATION ${install_dir}/lib/${LIB_PREFIX}${LIB}${LIB_SUFFIX}<br>
+      INTERFACE_INCLUDE_DIRECTORIES ${GTEST_INCLUDE_DIRS}<br>
+      INTERFACE_LINK_LIBRARIES "${GTEST_BOTH_LIBRARIES}"<br>
+    )<br>
+    add_dependencies(${LIB} googletest)<br>
+    list(APPEND GTEST_BOTH_LIBRARIES ${LIB})<br>
+  endforeach()<br>
 endmacro(build_external_gtest)<br>
<br>
 if (BENCHMARK_ENABLE_GTEST_TESTS)<br>
   if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/googletest)<br>
+    set(GTEST_ROOT "${CMAKE_SOURCE_DIR}/googletest")<br>
     set(INSTALL_GTEST OFF CACHE INTERNAL "")<br>
     set(INSTALL_GMOCK OFF CACHE INTERNAL "")<br>
     add_subdirectory(${CMAKE_SOURCE_DIR}/googletest)<br>
-    set(GTEST_BOTH_LIBRARIES gtest gtest_main)<br>
+    set(GTEST_BOTH_LIBRARIES gtest gmock gmock_main)<br>
+    foreach(HEADER test mock)<br>
+      # CMake 2.8 and older don't respect INTERFACE_INCLUDE_DIRECTORIES, so we<br>
+      # have to add the paths ourselves.<br>
+      set(HFILE g${HEADER}/g${HEADER}.h)<br>
+      set(HPATH ${GTEST_ROOT}/google${HEADER}/include)<br>
+      find_path(HEADER_PATH_${HEADER} ${HFILE}<br>
+          NO_DEFAULT_PATHS<br>
+          HINTS ${HPATH}<br>
+      )<br>
+      if (NOT HEADER_PATH_${HEADER})<br>
+        message(FATAL_ERROR "Failed to find header ${HFILE} in ${HPATH}")<br>
+      endif()<br>
+      list(APPEND GTEST_INCLUDE_DIRS ${HEADER_PATH_${HEADER}})<br>
+    endforeach()<br>
   elseif(BENCHMARK_DOWNLOAD_DEPENDENCIES)<br>
     build_external_gtest()<br>
   else()<br>
     find_package(GTest REQUIRED)<br>
+    find_path(GMOCK_INCLUDE_DIRS gmock/gmock.h<br>
+        HINTS ${GTEST_INCLUDE_DIRS})<br>
+    if (NOT GMOCK_INCLUDE_DIRS)<br>
+      message(FATAL_ERROR "Failed to find header gmock/gmock.h with hint ${GTEST_INCLUDE_DIRS}")<br>
+    endif()<br>
+    set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} ${GMOCK_INCLUDE_DIRS})<br>
+    # FIXME: We don't currently require the gmock library to build the tests,<br>
+    # and it's likely we won't find it, so we don't try. As long as we've<br>
+    # found the gmock/gmock.h header and gtest_main that should be good enough.<br>
   endif()<br>
 endif()<br>
<br>
Added: libcxx/trunk/utils/google-benchmark/cmake/split_list.cmake<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/cmake/split_list.cmake?rev=336635&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/cmake/split_list.cmake?rev=336635&view=auto</a><br>
==============================================================================<br>
--- libcxx/trunk/utils/google-benchmark/cmake/split_list.cmake (added)<br>
+++ libcxx/trunk/utils/google-benchmark/cmake/split_list.cmake Mon Jul  9 21:02:00 2018<br>
@@ -0,0 +1,3 @@<br>
+macro(split_list listname)<br>
+  string(REPLACE ";" " " ${listname} "${${listname}}")<br>
+endmacro()<br>
<br>
Added: libcxx/trunk/utils/google-benchmark/docs/AssemblyTests.md<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/docs/AssemblyTests.md?rev=336635&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/docs/AssemblyTests.md?rev=336635&view=auto</a><br>
==============================================================================<br>
--- libcxx/trunk/utils/google-benchmark/docs/AssemblyTests.md (added)<br>
+++ libcxx/trunk/utils/google-benchmark/docs/AssemblyTests.md Mon Jul  9 21:02:00 2018<br>
@@ -0,0 +1,147 @@<br>
+# Assembly Tests<br>
+<br>
+The Benchmark library provides a number of functions whose primary<br>
+purpose in to affect assembly generation, including `DoNotOptimize`<br>
+and `ClobberMemory`. In addition there are other functions,<br>
+such as `KeepRunning`, for which generating good assembly is paramount.<br>
+<br>
+For these functions it's important to have tests that verify the<br>
+correctness and quality of the implementation. This requires testing<br>
+the code generated by the compiler.<br>
+<br>
+This document describes how the Benchmark library tests compiler output,<br>
+as well as how to properly write new tests.<br>
+<br>
+<br>
+## Anatomy of a Test<br>
+<br>
+Writing a test has two steps:<br>
+<br>
+* Write the code you want to generate assembly for.<br>
+* Add `// CHECK` lines to match against the verified assembly.<br>
+<br>
+Example:<br>
+```c++<br>
+<br>
+// CHECK-LABEL: test_add:<br>
+extern "C" int test_add() {<br>
+    extern int ExternInt;<br>
+    return ExternInt + 1;<br>
+<br>
+    // CHECK: movl ExternInt(%rip), %eax<br>
+    // CHECK: addl %eax<br>
+    // CHECK: ret<br>
+}<br>
+<br>
+```<br>
+<br>
+#### LLVM Filecheck<br>
+<br>
+[LLVM's Filecheck](<a href="https://llvm.org/docs/CommandGuide/FileCheck.html" rel="noreferrer" target="_blank">https://llvm.org/docs/CommandGuide/FileCheck.html</a>)<br>
+is used to test the generated assembly against the `// CHECK` lines<br>
+specified in the tests source file. Please see the documentation<br>
+linked above for information on how to write `CHECK` directives.<br>
+<br>
+#### Tips and Tricks:<br>
+<br>
+* Tests should match the minimal amount of output required to establish<br>
+correctness. `CHECK` directives don't have to match on the exact next line<br>
+after the previous match, so tests should omit checks for unimportant<br>
+bits of assembly. ([`CHECK-NEXT`](<a href="https://llvm.org/docs/CommandGuide/FileCheck.html#the-check-next-directive" rel="noreferrer" target="_blank">https://llvm.org/docs/CommandGuide/FileCheck.html#the-check-next-directive</a>)<br>
+can be used to ensure a match occurs exactly after the previous match).<br>
+<br>
+* The tests are compiled with `-O3 -g0`. So we're only testing the<br>
+optimized output.<br>
+<br>
+* The assembly output is further cleaned up using `tools/strip_asm.py`.<br>
+This removes comments, assembler directives, and unused labels before<br>
+the test is run.<br>
+<br>
+* The generated and stripped assembly file for a test is output under<br>
+`<build-directory>/test/<test-name>.s`<br>
+<br>
+* Filecheck supports using [`CHECK` prefixes](<a href="https://llvm.org/docs/CommandGuide/FileCheck.html#cmdoption-check-prefixes" rel="noreferrer" target="_blank">https://llvm.org/docs/CommandGuide/FileCheck.html#cmdoption-check-prefixes</a>)<br>
+to specify lines that should only match in certain situations.<br>
+The Benchmark tests use `CHECK-CLANG` and `CHECK-GNU` for lines that<br>
+are only expected to match Clang or GCC's output respectively. Normal<br>
+`CHECK` lines match against all compilers. (Note: `CHECK-NOT` and<br>
+`CHECK-LABEL` are NOT prefixes. They are versions of non-prefixed<br>
+`CHECK` lines)<br>
+<br>
+* Use `extern "C"` to disable name mangling for specific functions. This<br>
+makes them easier to name in the `CHECK` lines.<br>
+<br>
+<br>
+## Problems Writing Portable Tests<br>
+<br>
+Writing tests which check the code generated by a compiler are<br>
+inherently non-portable. Different compilers and even different compiler<br>
+versions may generate entirely different code. The Benchmark tests<br>
+must tolerate this.<br>
+<br>
+LLVM Filecheck provides a number of mechanisms to help write<br>
+"more portable" tests; including [matching using regular expressions](<a href="https://llvm.org/docs/CommandGuide/FileCheck.html#filecheck-pattern-matching-syntax" rel="noreferrer" target="_blank">https://llvm.org/docs/CommandGuide/FileCheck.html#filecheck-pattern-matching-syntax</a>),<br>
+allowing the creation of [named variables](<a href="https://llvm.org/docs/CommandGuide/FileCheck.html#filecheck-variables" rel="noreferrer" target="_blank">https://llvm.org/docs/CommandGuide/FileCheck.html#filecheck-variables</a>)<br>
+for later matching, and [checking non-sequential matches](<a href="https://llvm.org/docs/CommandGuide/FileCheck.html#the-check-dag-directive" rel="noreferrer" target="_blank">https://llvm.org/docs/CommandGuide/FileCheck.html#the-check-dag-directive</a>).<br>
+<br>
+#### Capturing Variables<br>
+<br>
+For example, say GCC stores a variable in a register but Clang stores<br>
+it in memory. To write a test that tolerates both cases we "capture"<br>
+the destination of the store, and then use the captured expression<br>
+to write the remainder of the test.<br>
+<br>
+```c++<br>
+// CHECK-LABEL: test_div_no_op_into_shr:<br>
+extern "C" void test_div_no_op_into_shr(int value) {<br>
+    int divisor = 2;<br>
+    benchmark::DoNotOptimize(divisor); // hide the value from the optimizer<br>
+    return value / divisor;<br>
+<br>
+    // CHECK: movl $2, [[DEST:.*]]<br>
+    // CHECK: idivl [[DEST]]<br>
+    // CHECK: ret<br>
+}<br>
+```<br>
+<br>
+#### Using Regular Expressions to Match Differing Output<br>
+<br>
+Often tests require testing assembly lines which may subtly differ<br>
+between compilers or compiler versions. A common example of this<br>
+is matching stack frame addresses. In this case regular expressions<br>
+can be used to match the differing bits of output. For example:<br>
+<br>
+```c++<br>
+int ExternInt;<br>
+struct Point { int x, y, z; };<br>
+<br>
+// CHECK-LABEL: test_store_point:<br>
+extern "C" void test_store_point() {<br>
+    Point p{ExternInt, ExternInt, ExternInt};<br>
+    benchmark::DoNotOptimize(p);<br>
+<br>
+    // CHECK: movl ExternInt(%rip), %eax<br>
+    // CHECK: movl %eax, -{{[0-9]+}}(%rsp)<br>
+    // CHECK: movl %eax, -{{[0-9]+}}(%rsp)<br>
+    // CHECK: movl %eax, -{{[0-9]+}}(%rsp)<br>
+    // CHECK: ret<br>
+}<br>
+```<br>
+<br>
+## Current Requirements and Limitations<br>
+<br>
+The tests require Filecheck to be installed along the `PATH` of the<br>
+build machine. Otherwise the tests will be disabled.<br>
+<br>
+Additionally, as mentioned in the previous section, codegen tests are<br>
+inherently non-portable. Currently the tests are limited to:<br>
+<br>
+* x86_64 targets.<br>
+* Compiled with GCC or Clang<br>
+<br>
+Further work could be done, at least on a limited basis, to extend the<br>
+tests to other architectures and compilers (using `CHECK` prefixes).<br>
+<br>
+Furthermore, the tests fail for builds which specify additional flags<br>
+that modify code generation, including `--coverage` or `-fsanitize=`.<br>
+<br>
<br>
Modified: libcxx/trunk/utils/google-benchmark/include/benchmark/benchmark.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/include/benchmark/benchmark.h?rev=336635&r1=336634&r2=336635&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/include/benchmark/benchmark.h?rev=336635&r1=336634&r2=336635&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/utils/google-benchmark/include/benchmark/benchmark.h (original)<br>
+++ libcxx/trunk/utils/google-benchmark/include/benchmark/benchmark.h Mon Jul  9 21:02:00 2018<br>
@@ -164,7 +164,6 @@ BENCHMARK(BM_test)->Unit(benchmark::kMil<br>
 #ifndef BENCHMARK_BENCHMARK_H_<br>
 #define BENCHMARK_BENCHMARK_H_<br>
<br>
-<br>
 // The _MSVC_LANG check should detect Visual Studio 2015 Update 3 and newer.<br>
 #if __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L)<br>
 #define BENCHMARK_HAS_CXX11<br>
@@ -172,22 +171,23 @@ BENCHMARK(BM_test)->Unit(benchmark::kMil<br>
<br>
 #include <stdint.h><br>
<br>
+#include <algorithm><br>
 #include <cassert><br>
 #include <cstddef><br>
 #include <iosfwd><br>
-#include <string><br>
-#include <vector><br>
 #include <map><br>
 #include <set><br>
+#include <string><br>
+#include <vector><br>
<br>
 #if defined(BENCHMARK_HAS_CXX11)<br>
-#include <type_traits><br>
 #include <initializer_list><br>
+#include <type_traits><br>
 #include <utility><br>
 #endif<br>
<br>
 #if defined(_MSC_VER)<br>
-#include <intrin.h> // for _ReadWriteBarrier<br>
+#include <intrin.h>  // for _ReadWriteBarrier<br>
 #endif<br>
<br>
 #ifndef BENCHMARK_HAS_CXX11<br>
@@ -226,13 +226,15 @@ BENCHMARK(BM_test)->Unit(benchmark::kMil<br>
 #define BENCHMARK_INTERNAL_TOSTRING2(x) #x<br>
 #define BENCHMARK_INTERNAL_TOSTRING(x) BENCHMARK_INTERNAL_TOSTRING2(x)<br>
<br>
-#if defined(__GNUC__)<br>
+#if defined(__GNUC__) || defined(__clang__)<br>
 #define BENCHMARK_BUILTIN_EXPECT(x, y) __builtin_expect(x, y)<br>
 #define BENCHMARK_DEPRECATED_MSG(msg) __attribute__((deprecated(msg)))<br>
 #else<br>
 #define BENCHMARK_BUILTIN_EXPECT(x, y) x<br>
 #define BENCHMARK_DEPRECATED_MSG(msg)<br>
-#define BENCHMARK_WARNING_MSG(msg) __pragma(message(__FILE__ "(" BENCHMARK_INTERNAL_TOSTRING(__LINE__) ") : warning note: " msg))<br>
+#define BENCHMARK_WARNING_MSG(msg)                           \<br>
+  __pragma(message(__FILE__ "(" BENCHMARK_INTERNAL_TOSTRING( \<br>
+      __LINE__) ") : warning note: " msg))<br>
 #endif<br>
<br>
 #if defined(__GNUC__) && !defined(__clang__)<br>
@@ -289,13 +291,11 @@ BENCHMARK_UNUSED static int stream_init_<br>
<br>
 }  // namespace internal<br>
<br>
-<br>
 #if (!defined(__GNUC__) && !defined(__clang__)) || defined(__pnacl__) || \<br>
-    defined(EMSCRIPTN)<br>
-# define BENCHMARK_HAS_NO_INLINE_ASSEMBLY<br>
+    defined(__EMSCRIPTEN__)<br>
+#define BENCHMARK_HAS_NO_INLINE_ASSEMBLY<br>
 #endif<br>
<br>
-<br>
 // The DoNotOptimize(...) function can be used to prevent a value or<br>
 // expression from being optimized away by the compiler. This function is<br>
 // intended to add little to no overhead.<br>
@@ -303,14 +303,18 @@ BENCHMARK_UNUSED static int stream_init_<br>
 #ifndef BENCHMARK_HAS_NO_INLINE_ASSEMBLY<br>
 template <class Tp><br>
 inline BENCHMARK_ALWAYS_INLINE void DoNotOptimize(Tp const& value) {<br>
-  // Clang doesn't like the 'X' constraint on `value` and certain GCC versions<br>
-  // don't like the 'g' constraint. Attempt to placate them both.<br>
+  asm volatile("" : : "r,m"(value) : "memory");<br>
+}<br>
+<br>
+template <class Tp><br>
+inline BENCHMARK_ALWAYS_INLINE void DoNotOptimize(Tp& value) {<br>
 #if defined(__clang__)<br>
-  asm volatile("" : : "g"(value) : "memory");<br>
+  asm volatile("" : "+r,m"(value) : : "memory");<br>
 #else<br>
-  asm volatile("" : : "i,r,m"(value) : "memory");<br>
+  asm volatile("" : "+m,r"(value) : : "memory");<br>
 #endif<br>
 }<br>
+<br>
 // Force the compiler to flush pending writes to global memory. Acts as an<br>
 // effective read/write barrier<br>
 inline BENCHMARK_ALWAYS_INLINE void ClobberMemory() {<br>
@@ -323,9 +327,7 @@ inline BENCHMARK_ALWAYS_INLINE void DoNo<br>
   _ReadWriteBarrier();<br>
 }<br>
<br>
-inline BENCHMARK_ALWAYS_INLINE void ClobberMemory() {<br>
-  _ReadWriteBarrier();<br>
-}<br>
+inline BENCHMARK_ALWAYS_INLINE void ClobberMemory() { _ReadWriteBarrier(); }<br>
 #else<br>
 template <class Tp><br>
 inline BENCHMARK_ALWAYS_INLINE void DoNotOptimize(Tp const& value) {<br>
@@ -334,39 +336,54 @@ inline BENCHMARK_ALWAYS_INLINE void DoNo<br>
 // FIXME Add ClobberMemory() for non-gnu and non-msvc compilers<br>
 #endif<br>
<br>
-<br>
-<br>
 // This class is used for user-defined counters.<br>
 class Counter {<br>
-public:<br>
-<br>
+ public:<br>
   enum Flags {<br>
-    kDefaults   = 0,<br>
+    kDefaults = 0,<br>
     // Mark the counter as a rate. It will be presented divided<br>
     // by the duration of the benchmark.<br>
-    kIsRate     = 1,<br>
+    kIsRate = 1U << 0U,<br>
     // Mark the counter as a thread-average quantity. It will be<br>
     // presented divided by the number of threads.<br>
-    kAvgThreads = 2,<br>
+    kAvgThreads = 1U << 1U,<br>
     // Mark the counter as a thread-average rate. See above.<br>
-    kAvgThreadsRate = kIsRate|kAvgThreads<br>
+    kAvgThreadsRate = kIsRate | kAvgThreads,<br>
+    // Mark the counter as a constant value, valid/same for *every* iteration.<br>
+    // When reporting, it will be *multiplied* by the iteration count.<br>
+    kIsIterationInvariant = 1U << 2U,<br>
+    // Mark the counter as a constant rate.<br>
+    // When reporting, it will be *multiplied* by the iteration count<br>
+    // and then divided by the duration of the benchmark.<br>
+    kIsIterationInvariantRate = kIsRate | kIsIterationInvariant,<br>
+    // Mark the counter as a iteration-average quantity.<br>
+    // It will be presented divided by the number of iterations.<br>
+    kAvgIterations = 1U << 3U,<br>
+    // Mark the counter as a iteration-average rate. See above.<br>
+    kAvgIterationsRate = kIsRate | kAvgIterations<br>
   };<br>
<br>
   double value;<br>
-  Flags  flags;<br>
+  Flags flags;<br>
<br>
   BENCHMARK_ALWAYS_INLINE<br>
   Counter(double v = 0., Flags f = kDefaults) : value(v), flags(f) {}<br>
<br>
-  BENCHMARK_ALWAYS_INLINE operator double const& () const { return value; }<br>
-  BENCHMARK_ALWAYS_INLINE operator double      & ()       { return value; }<br>
-<br>
+  BENCHMARK_ALWAYS_INLINE operator double const&() const { return value; }<br>
+  BENCHMARK_ALWAYS_INLINE operator double&() { return value; }<br>
 };<br>
<br>
+// A helper for user code to create unforeseen combinations of Flags, without<br>
+// having to do this cast manually each time, or providing this operator.<br>
+Counter::Flags inline operator|(const Counter::Flags& LHS,<br>
+                                const Counter::Flags& RHS) {<br>
+  return static_cast<Counter::Flags>(static_cast<int>(LHS) |<br>
+                                     static_cast<int>(RHS));<br>
+}<br>
+<br>
 // This is the container for the user-defined counters.<br>
 typedef std::map<std::string, Counter> UserCounters;<br>
<br>
-<br>
 // TimeUnit is passed to a benchmark in order to specify the order of magnitude<br>
 // for the measured time.<br>
 enum TimeUnit { kNanosecond, kMicrosecond, kMillisecond };<br>
@@ -379,7 +396,7 @@ enum BigO { oNone, o1, oN, oNSquared, oN<br>
<br>
 // BigOFunc is passed to a benchmark in order to specify the asymptotic<br>
 // computational complexity for the benchmark.<br>
-typedef double(BigOFunc)(int);<br>
+typedef double(BigOFunc)(int64_t);<br>
<br>
 // StatisticsFunc is passed to a benchmark in order to compute some descriptive<br>
 // statistics over all the measurements of some type<br>
@@ -390,7 +407,7 @@ struct Statistics {<br>
   StatisticsFunc* compute_;<br>
<br>
   Statistics(std::string name, StatisticsFunc* compute)<br>
-    : name_(name), compute_(compute) {}<br>
+      : name_(name), compute_(compute) {}<br>
 };<br>
<br>
 namespace internal {<br>
@@ -399,14 +416,12 @@ class ThreadManager;<br>
<br>
 enum ReportMode<br>
 #if defined(BENCHMARK_HAS_CXX11)<br>
-  : unsigned<br>
+    : unsigned<br>
 #else<br>
 #endif<br>
-  {<br>
-  RM_Unspecified,  // The mode has not been manually specified<br>
+{ RM_Unspecified,  // The mode has not been manually specified<br>
   RM_Default,      // The mode is user-specified as default.<br>
-  RM_ReportAggregatesOnly<br>
-};<br>
+  RM_ReportAggregatesOnly };<br>
 }  // namespace internal<br>
<br>
 // State is passed to a running Benchmark and contains state for the<br>
@@ -429,16 +444,19 @@ class State {<br>
   // Returns true if the benchmark should continue through another iteration.<br>
   // NOTE: A benchmark may not return from the test until KeepRunning() has<br>
   // returned false.<br>
-  bool KeepRunning() {<br>
-    if (BENCHMARK_BUILTIN_EXPECT(!started_, false)) {<br>
-      StartKeepRunning();<br>
-    }<br>
-    bool const res = (--total_iterations_ != 0);<br>
-    if (BENCHMARK_BUILTIN_EXPECT(!res, false)) {<br>
-      FinishKeepRunning();<br>
-    }<br>
-    return res;<br>
-  }<br>
+  bool KeepRunning();<br>
+<br>
+  // Returns true iff the benchmark should run n more iterations.<br>
+  // REQUIRES: 'n' > 0.<br>
+  // NOTE: A benchmark must not return from the test until KeepRunningBatch()<br>
+  // has returned false.<br>
+  // NOTE: KeepRunningBatch() may overshoot by up to 'n' iterations.<br>
+  //<br>
+  // Intended usage:<br>
+  //   while (state.KeepRunningBatch(1000)) {<br>
+  //     // process 1000 elements<br>
+  //   }<br>
+  bool KeepRunningBatch(size_t n);<br>
<br>
   // REQUIRES: timer is running and 'SkipWithError(...)' has not been called<br>
   //           by the current thread.<br>
@@ -505,10 +523,10 @@ class State {<br>
   //<br>
   // REQUIRES: a benchmark has exited its benchmarking loop.<br>
   BENCHMARK_ALWAYS_INLINE<br>
-  void SetBytesProcessed(size_t bytes) { bytes_processed_ = bytes; }<br>
+  void SetBytesProcessed(int64_t bytes) { bytes_processed_ = bytes; }<br>
<br>
   BENCHMARK_ALWAYS_INLINE<br>
-  size_t bytes_processed() const { return bytes_processed_; }<br>
+  int64_t bytes_processed() const { return bytes_processed_; }<br>
<br>
   // If this routine is called with complexity_n > 0 and complexity report is<br>
   // requested for the<br>
@@ -516,10 +534,10 @@ class State {<br>
   // and complexity_n will<br>
   // represent the length of N.<br>
   BENCHMARK_ALWAYS_INLINE<br>
-  void SetComplexityN(int complexity_n) { complexity_n_ = complexity_n; }<br>
+  void SetComplexityN(int64_t complexity_n) { complexity_n_ = complexity_n; }<br>
<br>
   BENCHMARK_ALWAYS_INLINE<br>
-  int complexity_length_n() { return complexity_n_; }<br>
+  int64_t complexity_length_n() { return complexity_n_; }<br>
<br>
   // If this routine is called with items > 0, then an items/s<br>
   // label is printed on the benchmark report line for the currently<br>
@@ -528,10 +546,10 @@ class State {<br>
   //<br>
   // REQUIRES: a benchmark has exited its benchmarking loop.<br>
   BENCHMARK_ALWAYS_INLINE<br>
-  void SetItemsProcessed(size_t items) { items_processed_ = items; }<br>
+  void SetItemsProcessed(int64_t items) { items_processed_ = items; }<br>
<br>
   BENCHMARK_ALWAYS_INLINE<br>
-  size_t items_processed() const { return items_processed_; }<br>
+  int64_t items_processed() const { return items_processed_; }<br>
<br>
   // If this routine is called, the specified label is printed at the<br>
   // end of the benchmark report line for the currently executing<br>
@@ -539,7 +557,7 @@ class State {<br>
   //  static void BM_Compress(benchmark::State& state) {<br>
   //    ...<br>
   //    double compress = input_size / output_size;<br>
-  //    state.SetLabel(StringPrintf("compress:%.1f%%", 100.0*compression));<br>
+  //    state.SetLabel(StrFormat("compress:%.1f%%", 100.0*compression));<br>
   //  }<br>
   // Produces output that looks like:<br>
   //  BM_Compress   50         50   14115038  compress:27.3%<br>
@@ -553,33 +571,51 @@ class State {<br>
<br>
   // Range arguments for this run. CHECKs if the argument has been set.<br>
   BENCHMARK_ALWAYS_INLINE<br>
-  int range(std::size_t pos = 0) const {<br>
+  int64_t range(std::size_t pos = 0) const {<br>
     assert(range_.size() > pos);<br>
     return range_[pos];<br>
   }<br>
<br>
   BENCHMARK_DEPRECATED_MSG("use 'range(0)' instead")<br>
-  int range_x() const { return range(0); }<br>
+  int64_t range_x() const { return range(0); }<br>
<br>
   BENCHMARK_DEPRECATED_MSG("use 'range(1)' instead")<br>
-  int range_y() const { return range(1); }<br>
+  int64_t range_y() const { return range(1); }<br>
<br>
   BENCHMARK_ALWAYS_INLINE<br>
-  size_t iterations() const { return (max_iterations - total_iterations_) + 1; }<br>
+  size_t iterations() const {<br>
+    if (BENCHMARK_BUILTIN_EXPECT(!started_, false)) {<br>
+      return 0;<br>
+    }<br>
+    return max_iterations - total_iterations_ + batch_leftover_;<br>
+  }<br>
+<br>
+ private<br>
+     :  // items we expect on the first cache line (ie 64 bytes of the struct)<br>
+  // When total_iterations_ is 0, KeepRunning() and friends will return false.<br>
+  // May be larger than max_iterations.<br>
+  size_t total_iterations_;<br>
+<br>
+  // When using KeepRunningBatch(), batch_leftover_ holds the number of<br>
+  // iterations beyond max_iters that were run. Used to track<br>
+  // completed_iterations_ accurately.<br>
+  size_t batch_leftover_;<br>
+<br>
+ public:<br>
+  const size_t max_iterations;<br>
<br>
  private:<br>
   bool started_;<br>
   bool finished_;<br>
-  size_t total_iterations_;<br>
-<br>
-  std::vector<int> range_;<br>
+  bool error_occurred_;<br>
<br>
-  size_t bytes_processed_;<br>
-  size_t items_processed_;<br>
+ private:  // items we don't need on the first cache line<br>
+  std::vector<int64_t> range_;<br>
<br>
-  int complexity_n_;<br>
+  int64_t bytes_processed_;<br>
+  int64_t items_processed_;<br>
<br>
-  bool error_occurred_;<br>
+  int64_t complexity_n_;<br>
<br>
  public:<br>
   // Container for user-defined counters.<br>
@@ -588,27 +624,66 @@ class State {<br>
   const int thread_index;<br>
   // Number of threads concurrently executing the benchmark.<br>
   const int threads;<br>
-  const size_t max_iterations;<br>
<br>
   // TODO(EricWF) make me private<br>
-  State(size_t max_iters, const std::vector<int>& ranges, int thread_i,<br>
+  State(size_t max_iters, const std::vector<int64_t>& ranges, int thread_i,<br>
         int n_threads, internal::ThreadTimer* timer,<br>
         internal::ThreadManager* manager);<br>
<br>
  private:<br>
   void StartKeepRunning();<br>
+  // Implementation of KeepRunning() and KeepRunningBatch().<br>
+  // is_batch must be true unless n is 1.<br>
+  bool KeepRunningInternal(size_t n, bool is_batch);<br>
   void FinishKeepRunning();<br>
   internal::ThreadTimer* timer_;<br>
   internal::ThreadManager* manager_;<br>
   BENCHMARK_DISALLOW_COPY_AND_ASSIGN(State);<br>
 };<br>
<br>
+inline BENCHMARK_ALWAYS_INLINE bool State::KeepRunning() {<br>
+  return KeepRunningInternal(1, /*is_batch=*/false);<br>
+}<br>
+<br>
+inline BENCHMARK_ALWAYS_INLINE bool State::KeepRunningBatch(size_t n) {<br>
+  return KeepRunningInternal(n, /*is_batch=*/true);<br>
+}<br>
+<br>
+inline BENCHMARK_ALWAYS_INLINE bool State::KeepRunningInternal(size_t n,<br>
+                                                               bool is_batch) {<br>
+  // total_iterations_ is set to 0 by the constructor, and always set to a<br>
+  // nonzero value by StartKepRunning().<br>
+  assert(n > 0);<br>
+  // n must be 1 unless is_batch is true.<br>
+  assert(is_batch || n == 1);<br>
+  if (BENCHMARK_BUILTIN_EXPECT(total_iterations_ >= n, true)) {<br>
+    total_iterations_ -= n;<br>
+    return true;<br>
+  }<br>
+  if (!started_) {<br>
+    StartKeepRunning();<br>
+    if (!error_occurred_ && total_iterations_ >= n) {<br>
+      total_iterations_ -= n;<br>
+      return true;<br>
+    }<br>
+  }<br>
+  // For non-batch runs, total_iterations_ must be 0 by now.<br>
+  if (is_batch && total_iterations_ != 0) {<br>
+    batch_leftover_ = n - total_iterations_;<br>
+    total_iterations_ = 0;<br>
+    return true;<br>
+  }<br>
+  FinishKeepRunning();<br>
+  return false;<br>
+}<br>
+<br>
 struct State::StateIterator {<br>
   struct BENCHMARK_UNUSED Value {};<br>
   typedef std::forward_iterator_tag iterator_category;<br>
   typedef Value value_type;<br>
   typedef Value reference;<br>
   typedef Value pointer;<br>
+  typedef std::ptrdiff_t difference_type;<br>
<br>
  private:<br>
   friend class State;<br>
@@ -670,7 +745,7 @@ class Benchmark {<br>
   // Run this benchmark once with "x" as the extra argument passed<br>
   // to the function.<br>
   // REQUIRES: The function passed to the constructor must accept an arg1.<br>
-  Benchmark* Arg(int x);<br>
+  Benchmark* Arg(int64_t x);<br>
<br>
   // Run this benchmark with the given time unit for the generated output report<br>
   Benchmark* Unit(TimeUnit unit);<br>
@@ -678,23 +753,23 @@ class Benchmark {<br>
   // Run this benchmark once for a number of values picked from the<br>
   // range [start..limit].  (start and limit are always picked.)<br>
   // REQUIRES: The function passed to the constructor must accept an arg1.<br>
-  Benchmark* Range(int start, int limit);<br>
+  Benchmark* Range(int64_t start, int64_t limit);<br>
<br>
   // Run this benchmark once for all values in the range [start..limit] with<br>
   // specific step<br>
   // REQUIRES: The function passed to the constructor must accept an arg1.<br>
-  Benchmark* DenseRange(int start, int limit, int step = 1);<br>
+  Benchmark* DenseRange(int64_t start, int64_t limit, int step = 1);<br>
<br>
   // Run this benchmark once with "args" as the extra arguments passed<br>
   // to the function.<br>
   // REQUIRES: The function passed to the constructor must accept arg1, arg2 ...<br>
-  Benchmark* Args(const std::vector<int>& args);<br>
+  Benchmark* Args(const std::vector<int64_t>& args);<br>
<br>
   // Equivalent to Args({x, y})<br>
   // NOTE: This is a legacy C++03 interface provided for compatibility only.<br>
   //   New code should use 'Args'.<br>
-  Benchmark* ArgPair(int x, int y) {<br>
-    std::vector<int> args;<br>
+  Benchmark* ArgPair(int64_t x, int64_t y) {<br>
+    std::vector<int64_t> args;<br>
     args.push_back(x);<br>
     args.push_back(y);<br>
     return Args(args);<br>
@@ -703,7 +778,7 @@ class Benchmark {<br>
   // Run this benchmark once for a number of values picked from the<br>
   // ranges [start..limit].  (starts and limits are always picked.)<br>
   // REQUIRES: The function passed to the constructor must accept arg1, arg2 ...<br>
-  Benchmark* Ranges(const std::vector<std::pair<int, int> >& ranges);<br>
+  Benchmark* Ranges(const std::vector<std::pair<int64_t, int64_t> >& ranges);<br>
<br>
   // Equivalent to ArgNames({name})<br>
   Benchmark* ArgName(const std::string& name);<br>
@@ -715,8 +790,8 @@ class Benchmark {<br>
   // Equivalent to Ranges({{lo1, hi1}, {lo2, hi2}}).<br>
   // NOTE: This is a legacy C++03 interface provided for compatibility only.<br>
   //   New code should use 'Ranges'.<br>
-  Benchmark* RangePair(int lo1, int hi1, int lo2, int hi2) {<br>
-    std::vector<std::pair<int, int> > ranges;<br>
+  Benchmark* RangePair(int64_t lo1, int64_t hi1, int64_t lo2, int64_t hi2) {<br>
+    std::vector<std::pair<int64_t, int64_t> > ranges;<br>
     ranges.push_back(std::make_pair(lo1, hi1));<br>
     ranges.push_back(std::make_pair(lo2, hi2));<br>
     return Ranges(ranges);<br>
@@ -823,15 +898,13 @@ class Benchmark {<br>
<br>
   int ArgsCnt() const;<br>
<br>
-  static void AddRange(std::vector<int>* dst, int lo, int hi, int mult);<br>
-<br>
  private:<br>
   friend class BenchmarkFamilies;<br>
<br>
   std::string name_;<br>
   ReportMode report_mode_;<br>
-  std::vector<std::string> arg_names_;   // Args for all benchmark runs<br>
-  std::vector<std::vector<int> > args_;  // Args for all benchmark runs<br>
+  std::vector<std::string> arg_names_;       // Args for all benchmark runs<br>
+  std::vector<std::vector<int64_t> > args_;  // Args for all benchmark runs<br>
   TimeUnit time_unit_;<br>
   int range_multiplier_;<br>
   double min_time_;<br>
@@ -1055,7 +1128,7 @@ class Fixture : public internal::Benchma<br>
   class BaseClass##_##Method##_Benchmark : public BaseClass<a> {    \<br>
    public:                                                          \<br>
     BaseClass##_##Method##_Benchmark() : BaseClass<a>() {           \<br>
-      this->SetName(#BaseClass"<" #a ">/" #Method);                 \<br>
+      this->SetName(#BaseClass "<" #a ">/" #Method);                \<br>
     }                                                               \<br>
                                                                     \<br>
    protected:                                                       \<br>
@@ -1066,7 +1139,7 @@ class Fixture : public internal::Benchma<br>
   class BaseClass##_##Method##_Benchmark : public BaseClass<a, b> {    \<br>
    public:                                                             \<br>
     BaseClass##_##Method##_Benchmark() : BaseClass<a, b>() {           \<br>
-      this->SetName(#BaseClass"<" #a "," #b ">/" #Method);             \<br>
+      this->SetName(#BaseClass "<" #a "," #b ">/" #Method);            \<br>
     }                                                                  \<br>
                                                                        \<br>
    protected:                                                          \<br>
@@ -1078,14 +1151,15 @@ class Fixture : public internal::Benchma<br>
   class BaseClass##_##Method##_Benchmark : public BaseClass<__VA_ARGS__> { \<br>
    public:                                                                 \<br>
     BaseClass##_##Method##_Benchmark() : BaseClass<__VA_ARGS__>() {        \<br>
-      this->SetName(#BaseClass"<" #__VA_ARGS__ ">/" #Method);              \<br>
+      this->SetName(#BaseClass "<" #__VA_ARGS__ ">/" #Method);             \<br>
     }                                                                      \<br>
                                                                            \<br>
    protected:                                                              \<br>
     virtual void BenchmarkCase(::benchmark::State&);                       \<br>
   };<br>
 #else<br>
-#define BENCHMARK_TEMPLATE_PRIVATE_DECLARE_F(n, a) BENCHMARK_TEMPLATE1_PRIVATE_DECLARE_F(n, a)<br>
+#define BENCHMARK_TEMPLATE_PRIVATE_DECLARE_F(n, a) \<br>
+  BENCHMARK_TEMPLATE1_PRIVATE_DECLARE_F(n, a)<br>
 #endif<br>
<br>
 #define BENCHMARK_DEFINE_F(BaseClass, Method)    \<br>
@@ -1105,7 +1179,8 @@ class Fixture : public internal::Benchma<br>
   BENCHMARK_TEMPLATE_PRIVATE_DECLARE_F(BaseClass, Method, __VA_ARGS__) \<br>
   void BaseClass##_##Method##_Benchmark::BenchmarkCase<br>
 #else<br>
-#define BENCHMARK_TEMPLATE_DEFINE_F(BaseClass, Method, a) BENCHMARK_TEMPLATE1_DEFINE_F(BaseClass, Method, a)<br>
+#define BENCHMARK_TEMPLATE_DEFINE_F(BaseClass, Method, a) \<br>
+  BENCHMARK_TEMPLATE1_DEFINE_F(BaseClass, Method, a)<br>
 #endif<br>
<br>
 #define BENCHMARK_REGISTER_F(BaseClass, Method) \<br>
@@ -1132,24 +1207,24 @@ class Fixture : public internal::Benchma<br>
   void BaseClass##_##Method##_Benchmark::BenchmarkCase<br>
<br>
 #ifdef BENCHMARK_HAS_CXX11<br>
-#define BENCHMARK_TEMPLATE_F(BaseClass, Method, ...)           \<br>
+#define BENCHMARK_TEMPLATE_F(BaseClass, Method, ...)                   \<br>
   BENCHMARK_TEMPLATE_PRIVATE_DECLARE_F(BaseClass, Method, __VA_ARGS__) \<br>
-  BENCHMARK_REGISTER_F(BaseClass, Method);                     \<br>
+  BENCHMARK_REGISTER_F(BaseClass, Method);                             \<br>
   void BaseClass##_##Method##_Benchmark::BenchmarkCase<br>
 #else<br>
-#define BENCHMARK_TEMPLATE_F(BaseClass, Method, a) BENCHMARK_TEMPLATE1_F(BaseClass, Method, a)<br>
+#define BENCHMARK_TEMPLATE_F(BaseClass, Method, a) \<br>
+  BENCHMARK_TEMPLATE1_F(BaseClass, Method, a)<br>
 #endif<br>
<br>
 // Helper macro to create a main routine in a test that runs the benchmarks<br>
-#define BENCHMARK_MAIN()                   \<br>
-  int main(int argc, char** argv) {        \<br>
-    ::benchmark::Initialize(&argc, argv);  \<br>
+#define BENCHMARK_MAIN()                                                \<br>
+  int main(int argc, char** argv) {                                     \<br>
+    ::benchmark::Initialize(&argc, argv);                               \<br>
     if (::benchmark::ReportUnrecognizedArguments(argc, argv)) return 1; \<br>
-    ::benchmark::RunSpecifiedBenchmarks(); \<br>
-  }                                        \<br>
+    ::benchmark::RunSpecifiedBenchmarks();                              \<br>
+  }                                                                     \<br>
   int main(int, char**)<br>
<br>
-<br>
 // ------------------------------------------------------<br>
 // Benchmark Reporters<br>
<br>
@@ -1186,7 +1261,7 @@ class BenchmarkReporter {<br>
     CPUInfo const& cpu_info;<br>
     // The number of chars in the longest benchmark name.<br>
     size_t name_field_width;<br>
-<br>
+    static const char* executable_name;<br>
     Context();<br>
   };<br>
<br>
@@ -1239,7 +1314,7 @@ class BenchmarkReporter {<br>
     // Keep track of arguments to compute asymptotic complexity<br>
     BigO complexity;<br>
     BigOFunc* complexity_lambda;<br>
-    int complexity_n;<br>
+    int64_t complexity_n;<br>
<br>
     // what statistics to compute from the measurements<br>
     const std::vector<Statistics>* statistics;<br>
@@ -1309,17 +1384,19 @@ class BenchmarkReporter {<br>
 // Simple reporter that outputs benchmark data to the console. This is the<br>
 // default reporter used by RunSpecifiedBenchmarks().<br>
 class ConsoleReporter : public BenchmarkReporter {<br>
-public:<br>
+ public:<br>
   enum OutputOptions {<br>
     OO_None = 0,<br>
     OO_Color = 1,<br>
     OO_Tabular = 2,<br>
-    OO_ColorTabular = OO_Color|OO_Tabular,<br>
+    OO_ColorTabular = OO_Color | OO_Tabular,<br>
     OO_Defaults = OO_ColorTabular<br>
   };<br>
   explicit ConsoleReporter(OutputOptions opts_ = OO_Defaults)<br>
-      : output_options_(opts_), name_field_width_(0),<br>
-        prev_counters_(), printed_header_(false) {}<br>
+      : output_options_(opts_),<br>
+        name_field_width_(0),<br>
+        prev_counters_(),<br>
+        printed_header_(false) {}<br>
<br>
   virtual bool ReportContext(const Context& context);<br>
   virtual void ReportRuns(const std::vector<Run>& reports);<br>
@@ -1347,7 +1424,8 @@ class JSONReporter : public BenchmarkRep<br>
   bool first_report_;<br>
 };<br>
<br>
-class CSVReporter : public BenchmarkReporter {<br>
+class BENCHMARK_DEPRECATED_MSG("The CSV Reporter will be removed in a future release")<br>
+      CSVReporter : public BenchmarkReporter {<br>
  public:<br>
   CSVReporter() : printed_header_(false) {}<br>
   virtual bool ReportContext(const Context& context);<br>
@@ -1357,7 +1435,7 @@ class CSVReporter : public BenchmarkRepo<br>
   void PrintRunData(const Run& report);<br>
<br>
   bool printed_header_;<br>
-  std::set< std::string > user_counter_names_;<br>
+  std::set<std::string> user_counter_names_;<br>
 };<br>
<br>
 inline const char* GetTimeUnitString(TimeUnit unit) {<br>
@@ -1384,6 +1462,6 @@ inline double GetTimeUnitMultiplier(Time<br>
   }<br>
 }<br>
<br>
-} // namespace benchmark<br>
+}  // namespace benchmark<br>
<br>
 #endif  // BENCHMARK_BENCHMARK_H_<br>
<br>
Added: libcxx/trunk/utils/google-benchmark/releasing.md<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/releasing.md?rev=336635&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/releasing.md?rev=336635&view=auto</a><br>
==============================================================================<br>
--- libcxx/trunk/utils/google-benchmark/releasing.md (added)<br>
+++ libcxx/trunk/utils/google-benchmark/releasing.md Mon Jul  9 21:02:00 2018<br>
@@ -0,0 +1,16 @@<br>
+# How to release<br>
+<br>
+* Make sure you're on master and synced to HEAD<br>
+* Ensure the project builds and tests run (sanity check only, obviously)<br>
+    * `parallel -j0 exec ::: test/*_test` can help ensure everything at least<br>
+      passes<br>
+* Prepare release notes<br>
+    * `git log $(git describe --abbrev=0 --tags)..HEAD` gives you the list of<br>
+      commits between the last annotated tag and HEAD<br>
+    * Pick the most interesting.<br>
+* Create a release through github's interface<br>
+    * Note this will create a lightweight tag.<br>
+    * Update this to an annotated tag:<br>
+      * `git pull --tags`<br>
+      * `git tag -a -f <tag> <tag>`<br>
+      * `git push --force origin`<br>
<br>
Modified: libcxx/trunk/utils/google-benchmark/src/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/src/CMakeLists.txt?rev=336635&r1=336634&r2=336635&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/src/CMakeLists.txt?rev=336635&r1=336634&r2=336635&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/utils/google-benchmark/src/CMakeLists.txt (original)<br>
+++ libcxx/trunk/utils/google-benchmark/src/CMakeLists.txt Mon Jul  9 21:02:00 2018<br>
@@ -11,6 +11,10 @@ file(GLOB<br>
     *.cc<br>
     ${PROJECT_SOURCE_DIR}/include/benchmark/*.h<br>
     ${CMAKE_CURRENT_SOURCE_DIR}/*.h)<br>
+file(GLOB BENCHMARK_MAIN "benchmark_main.cc")<br>
+foreach(item ${BENCHMARK_MAIN})<br>
+  list(REMOVE_ITEM SOURCE_FILES "${item}")<br>
+endforeach()<br>
<br>
 add_library(benchmark ${SOURCE_FILES})<br>
 set_target_properties(benchmark PROPERTIES<br>
@@ -34,6 +38,23 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows<br>
   target_link_libraries(benchmark Shlwapi)<br>
 endif()<br>
<br>
+# We need extra libraries on Solaris<br>
+if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")<br>
+  target_link_libraries(benchmark kstat)<br>
+endif()<br>
+<br>
+# Benchmark main library<br>
+add_library(benchmark_main "benchmark_main.cc")<br>
+set_target_properties(benchmark_main PROPERTIES<br>
+  OUTPUT_NAME "benchmark_main"<br>
+  VERSION ${GENERIC_LIB_VERSION}<br>
+  SOVERSION ${GENERIC_LIB_SOVERSION}<br>
+)<br>
+target_include_directories(benchmark PUBLIC<br>
+    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include><br>
+    )<br>
+target_link_libraries(benchmark_main benchmark)<br>
+<br>
 set(include_install_dir "include")<br>
 set(lib_install_dir "lib/")<br>
 set(bin_install_dir "bin/")<br>
@@ -51,7 +72,7 @@ set(namespace "${PROJECT_NAME}::")<br>
<br>
 include(CMakePackageConfigHelpers)<br>
 write_basic_package_version_file(<br>
-    "${version_config}" VERSION ${GIT_VERSION} COMPATIBILITY SameMajorVersion<br>
+  "${version_config}" VERSION ${GENERIC_LIB_VERSION} COMPATIBILITY SameMajorVersion<br>
 )<br>
<br>
 configure_file("${PROJECT_SOURCE_DIR}/cmake/<a href="http://Config.cmake.in" rel="noreferrer" target="_blank">Config.cmake.in</a>" "${project_config}" @ONLY)<br>
@@ -60,7 +81,7 @@ configure_file("${PROJECT_SOURCE_DIR}/cm<br>
 if (BENCHMARK_ENABLE_INSTALL)<br>
   # Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable)<br>
   install(<br>
-    TARGETS benchmark<br>
+    TARGETS benchmark benchmark_main<br>
     EXPORT ${targets_export_name}<br>
     ARCHIVE DESTINATION ${lib_install_dir}<br>
     LIBRARY DESTINATION ${lib_install_dir}<br>
<br>
Modified: libcxx/trunk/utils/google-benchmark/src/benchmark.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/src/benchmark.cc?rev=336635&r1=336634&r2=336635&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/google-benchmark/src/benchmark.cc?rev=336635&r1=336634&r2=336635&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/utils/google-benchmark/src/benchmark.cc (original)<br>
+++ libcxx/trunk/utils/google-benchmark/src/benchmark.cc Mon Jul  9 21:02:00 2018<br>
@@ -17,7 +17,9 @@<br>
 #include "internal_macros.h"<br>
<br>
 #ifndef BENCHMARK_OS_WINDOWS<br>
+#ifndef BENCHMARK_OS_FUCHSIA<br>
 #include <sys/resource.h><br>
+#endif<br>
 #include <sys/time.h><br>
 #include <unistd.h><br>
 #endif<br>
@@ -27,10 +29,10 @@<br>
 #include <condition_variable><br>
 #include <cstdio><br>
 #include <cstdlib><br>
-#include <cstring><br>
 #include <fstream><br>
 #include <iostream><br>
 #include <memory><br>
+#include <string><br>
 #include <thread><br>
<br>
 #include "check.h"<br>
@@ -44,7 +46,8 @@<br>
 #include "re.h"<br>
 #include "statistics.h"<br>
 #include "string_util.h"<br>
-#include "timers.h"<br>
+#include "thread_manager.h"<br>
+#include "thread_timer.h"<br>
<br>
 DEFINE_bool(benchmark_list_tests, false,<br>
             "Print a list of benchmarks. This option overrides all other "<br>
@@ -82,7 +85,7 @@ DEFINE_string(benchmark_out_format, "jso<br>
               "The format to use for file output. Valid values are "<br>
               "'console', 'json', or 'csv'.");<br>
<br>
-DEFINE_string(benchmark_out, "", "The file to write additonal output to");<br>
+DEFINE_string(benchmark_out, "", "The file to write additional output to");<br>
<br>
 DEFINE_string(benchmark_color, "auto",<br>
               "Whether to use colors in the output.  Valid values: "<br>
@@ -108,119 +111,11 @@ namespace internal {<br>
<br>
 void UseCharPointer(char const volatile*) {}<br>
<br>
-class ThreadManager {<br>
- public:<br>
-  ThreadManager(int num_threads)<br>
-      : alive_threads_(num_threads), start_stop_barrier_(num_threads) {}<br>
-<br>
-  Mutex& GetBenchmarkMutex() const RETURN_CAPABILITY(benchmark_mutex_) {<br>
-    return benchmark_mutex_;<br>
-  }<br>
-<br>
-  bool StartStopBarrier() EXCLUDES(end_cond_mutex_) {<br>
-    return start_stop_barrier_.wait();<br>
-  }<br>
-<br>
-  void NotifyThreadComplete() EXCLUDES(end_cond_mutex_) {<br>
-    start_stop_barrier_.removeThread();<br>
-    if (--alive_threads_ == 0) {<br>
-      MutexLock lock(end_cond_mutex_);<br>
-      end_condition_.notify_all();<br>
-    }<br>
-  }<br>
-<br>
-  void WaitForAllThreads() EXCLUDES(end_cond_mutex_) {<br>
-    MutexLock lock(end_cond_mutex_);<br>
-    end_condition_.wait(lock.native_handle(),<br>
-                        [this]() { return alive_threads_ == 0; });<br>
-  }<br>
-<br>
- public:<br>
-  struct Result {<br>
-    double real_time_used = 0;<br>
-    double cpu_time_used = 0;<br>
-    double manual_time_used = 0;<br>
-    int64_t bytes_processed = 0;<br>
-    int64_t items_processed = 0;<br>
-    int complexity_n = 0;<br>
-    std::string report_label_;<br>
-    std::string error_message_;<br>
-    bool has_error_ = false;<br>
-    UserCounters counters;<br>
-  };<br>
-  GUARDED_BY(GetBenchmarkMutex()) Result results;<br>
-<br>
- private:<br>
-  mutable Mutex benchmark_mutex_;<br>
-  std::atomic<int> alive_threads_;<br>
-  Barrier start_stop_barrier_;<br>
-  Mutex end_cond_mutex_;<br>
-  Condition end_condition_;<br>
-};<br>
-<br>
-// Timer management class<br>
-class ThreadTimer {<br>
- public:<br>
-  ThreadTimer() = default;<br>
-<br>
-  // Called by each thread<br>
-  void StartTimer() {<br>
-    running_ = true;<br>
-    start_real_time_ = ChronoClockNow();<br>
-    start_cpu_time_ = ThreadCPUUsage();<br>
-  }<br>
-<br>
-  // Called by each thread<br>
-  void StopTimer() {<br>
-    CHECK(running_);<br>
-    running_ = false;<br>
-    real_time_used_ += ChronoClockNow() - start_real_time_;<br>
-    // Floating point error can result in the subtraction producing a negative<br>
-    // time. Guard against that.<br>
-    cpu_time_used_ += std::max<double>(ThreadCPUUsage() - start_cpu_time_, 0);<br>
-  }<br>
-<br>
-  // Called by each thread<br>
-  void SetIterationTime(double seconds) { manual_time_used_ += seconds; }<br>
-<br>
-  bool running() const { return running_; }<br>
-<br>
-  // REQUIRES: timer is not running<br>
-  double real_time_used() {<br>
-    CHECK(!running_);<br>
-    return real_time_used_;<br>
-  }<br>
-<br>
-  // REQUIRES: timer is not running<br>
-  double cpu_time_used() {<br>
-    CHECK(!running_);<br>
-    return cpu_time_used_;<br>
-  }<br>
-<br>
-  // REQUIRES: timer is not running<br>
-  double manual_time_used() {<br>
-    CHECK(!running_);<br>
-    return manual_time_used_;<br>
-  }<br>
-<br>
- private:<br>
-  bool running_ = false;        // Is the timer running<br>
-  double start_real_time_ = 0;  // If running_<br>
-  double start_cpu_time_ = 0;   // If running_<br>
-<br>
-  // Accumulated time so far (does not contain current slice if running_)<br>
-  double real_time_used_ = 0;<br>
-  double cpu_time_used_ = 0;<br>
-  // Manually set iteration time. User sets this with SetIterationTime(seconds).<br>
-  double manual_time_used_ = 0;<br>
-};<br>
-<br>
 namespace {<br>
<br>
 BenchmarkReporter::Run CreateRunReport(<br>
     const benchmark::internal::Benchmark::Instance& b,<br>
-    const internal::ThreadManager::Result& results, size_t iters,<br>
-    double seconds) {<br>
+    const internal::ThreadManager::Result& results, double seconds) {<br>
   // Create report about this benchmark run.<br>
   BenchmarkReporter::Run report;<br>
<br>
@@ -228,8 +123,8 @@ BenchmarkReporter::Run CreateRunReport(<br>
   report.error_occurred = results.has_error_;<br>
   report.error_message = results.error_message_;<br>
   report.report_label = results.report_label_;<br>
-  // Report the total iterations across all threads.<br>
-  report.iterations = static_cast<int64_t>(iters) * b.threads;<br>
+</blockquote></div></div>