1. 30 Jul, 2019 1 commit
  2. 29 Jul, 2019 2 commits
  3. 27 Jul, 2019 1 commit
    • Bugfix/wsl selftest fixes. Fixes #839 (#843) · 32a1e397
      Eric Backus authored
      * Update AUTHORS and CONTRIBUTORS
      
      * Fix WSL self-test failures
      
      Some of the benchmark self-tests expect and check for a particular
      output format from the benchmark library. The numerical values must
      not be infinity or not-a-number, or the test will report an error.
      Some of the values are computed bytes-per-second or items-per-second
      values, so these require that the measured CPU time for the test to be
      non-zero. But the loop that is being measured was empty, so the
      measured CPU time for the loop was extremely small. On systems like
      Windows Subsystem for Linux (WSL) the timer doesn't have enough
      resolution to measure this, so the measured CPU time was zero.
      
      This fix just makes sure that these tests have something within the
      timing loop, so that the benchmark library will not decide that the
      loop takes zero CPU time. This makes these tests more robust, and in
      particular makes them pass on WSL.
  4. 22 Jul, 2019 1 commit
  5. 17 Jul, 2019 1 commit
  6. 05 Jul, 2019 1 commit
    • Add RISC-V support in cycleclock::Now (#833) · 4abdfbb8
      Sam Elliott authored
      The RISC-V implementation of `cycleclock::Now` uses the user-space
      `rdcycle` instruction to query how many cycles have happened since the
      core started.
      
      The only complexity here is on 32-bit RISC-V, where `rdcycle` can only
      read the lower 32 bits of the 64-bit hardware counter. In this case,
      `rdcycleh` reads the higher 32 bits of the counter. We match the powerpc
      implementation to detect and correct for overflow in the high bits.
  7. 26 Jun, 2019 1 commit
  8. 13 May, 2019 2 commits
    • Use IterationCount in one more place · 090faecb
      Roman Lebedev authored
      Found in -UNDEBUG build
    • Iteration counts should be `uint64_t` globally. (#817) · f92903cc
      Roman Lebedev authored
      This is a shameless rip-off of https://github.com/google/benchmark/pull/646
      I did promise to look into why that proposed PR was producing
      so much worse assembly, and so i finally did.
      
      The reason is - that diff changes `size_t` (unsigned) to `int64_t` (signed).
      
      There is this nice little `assert`:
      https://github.com/google/benchmark/blob/7a1c37028359ca9d386d719a6ad527743cf1b753/include/benchmark/benchmark.h#L744
      It ensures that we didn't magically decide to advance our iterator
      when we should have finished benchmarking.
      
      When `cached_` was unsigned, the `assert` was `cached_ UGT 0`.
      But we only ever get to that `assert` if `cached_ NE 0`,
      and naturally if `cached_` is not `0`, then it is bigger than `0`,
      so the `assert` is tautological, and gets folded away.
      
      But now that `cached_` became signed, the assert became `cached_ SGT 0`.
      And we still only know that `cached_ NE 0`, so the assert can't be
      optimized out, or at least it doesn't currently.
      
      Regardless of whether or not that is a bug in itself,
      that particular diff would have regressed the normal 64-bit systems,
      by halving the maximal iteration space (since we go from unsigned counter
      to signed one, of the same bit-width), which seems like a bug.
      And just so it happens, fixing *this* bug, fixes the other bug.
      
      This produces fully (bit-by-bit) identical state_assembly_test.s
      The filecheck change is actually needed regardless of this patch,
      else this test does not pass for me even without this diff.
  9. 11 May, 2019 1 commit
  10. 10 May, 2019 1 commit
  11. 09 May, 2019 1 commit
  12. 07 May, 2019 1 commit
  13. 01 May, 2019 3 commits
  14. 30 Apr, 2019 4 commits
  15. 25 Apr, 2019 1 commit
    • Improve README (#804) · 05d8c1c5
      astee authored
      * Update and organize README
      
      * Update AUTHORS and CONTRIBUTORS
      
      Fixes #803.
  16. 19 Apr, 2019 1 commit
  17. 17 Apr, 2019 1 commit
  18. 11 Apr, 2019 2 commits
  19. 09 Apr, 2019 2 commits
  20. 08 Apr, 2019 1 commit
  21. 05 Apr, 2019 1 commit
    • Silence CMake Policy 0063 warning (#790) · 3bc802e4
      Joseph Loser authored
      Summary:
      - When google benchmark is used as a submodule in a parent projects
        whose min CMake version is 3.3.2 or later, the google benchmark
        `CMakeLists.txt` triggers a warning regarding CMake policy 0063:
      
      ```
      CMake Warning (dev) at tests/googlebenchmark/src/CMakeLists.txt:19 (add_library):
        Policy CMP0063 is not set: Honor visibility properties for all target
        types.  Run "cmake --help-policy CMP0063" for policy details.  Use the
        cmake_policy command to set the policy and suppress this warning.
      
        Target "benchmark" of type "STATIC_LIBRARY" has the following visibility
        properties set for CXX:
      
          CXX_VISIBILITY_PRESET
          VISIBILITY_INLINES_HIDDEN
      
        For compatibility CMake is not honoring them for this target.
      This warning is for project developers.  Use -Wno-dev to suppress it.
      ```
      
      - Set CMake Policy 0063 to NEW if the policy is available. This will not
        affect parent projects who include benchmark but do not have a CMake min
        version of 3.3.2 or later, i.e. when this policy is introduced.
  22. 28 Mar, 2019 2 commits
  23. 26 Mar, 2019 2 commits
    • Negative ranges #762 (#787) · e3666568
      Daniel Harvey authored
      * Add FIXME in multiple_ranges_test.cc
      
      * Improve handling of large bounds in AddRange.
      
      Due to breaking the loop too early, AddRange
      would miss a final multplier of 'mult' that
      was within the numeric range of T.
      
      * Enable negative values for Range argument
      
      Fixes #762.
      
      * Try to fix build of benchmark_gtest
      
      * Try some more to fix build
      
      * Attempt to fix format macros
      
      * Attempt to resolve format errors for mingw32
      
      * Review feedback
      
      Put unit tests in benchmark::internal namespace
      
      Fix error reporting in multiple_ranges_test.cc
    • [JSON] add threads and repetitions to the json output (#748) · 478eafa3
      BaaMeow authored
      * [JSON] add threads and repetitions to the json output, for better ide…
      [Tests] explicitly check for thread == 1
      [Tests] specifically mark all repetition checks
      [JSON] add repetition_index reporting, but only for non-aggregates (i…
      
      * [Formatting] Be very, very explicit about pointer alignment so clang-format can not put pointers/references on the wrong side of arguments.
      [Benchmark::Run] Make sure to use explanatory sentinel variable rather than a magic number.
      
      * Do not pass redundant information
  24. 19 Mar, 2019 1 commit
  25. 17 Mar, 2019 2 commits
    • Travis-ci: fix clang+libc++ build (#783) · 5acb0f05
      Roman Lebedev authored
      It broke because the libc++ is being built as part of *this*
      build, with old gcc+libstdc++ (4.8?), but LLVM is preparing
      to switch to C++14, and gcc+libstdc++ <5 are soft-deprecated.
      
      Just the gcc update doesn't cut it, clang still uses old libstdc++.
    • BENCHMARK_CAPTURE() and Complexity() - naming problem (#761) · f6e96861
      Daniel Harvey authored
      Created BenchmarkName class which holds the full benchmark
      name and allows specifying and retrieving different components
      of the name (e.g. ARGS, THREADS etc.)
      
      Fixes #730.
  26. 06 Mar, 2019 2 commits
  27. 28 Feb, 2019 1 commit