Commit Graph

86 Commits

Author SHA1 Message Date
Pierre Phaneuf c96fb246b9 Add a few output files to .gitignore. 2014-06-04 15:34:58 +01:00
Dominic Hamon e5a431998d Merge pull request #23 from ckennelly/clock_initialization
Resolve race on approx_time_ in FastClock.
2014-05-05 10:03:11 -07:00
Dominic Hamon 46507cb276 Merge pull request #22 from ckennelly/mutex_initialization
Statically initialize benchmark_mutex and extend its lifetime.
2014-05-05 10:02:50 -07:00
Dominic Hamon 276bda99ac Merge pull request #21 from ckennelly/issue20
Resolve benchmark cleanup race condition in issue #20.
2014-05-05 10:02:33 -07:00
Chris Kennelly 2c9b29c9ff Resolve race on approx_time_ in FastClock.
InitType should hold a lock before storing to approx_time_, which is later
read by the background worker.  When the worker is actively running (i.e., not
blocked on bg_cond_) it holds bg_mutex_.

InitType is called during benchmark setup only, so any contention induced for
the mutex should not have performance/accuracy consequences.
2014-05-05 09:45:27 -07:00
Chris Kennelly 77106c1f68 Statically initialize benchmark_mutex and extend its lifetime.
RunSpecifiedBenchmarks destroys benchmark_mutex before its last usage,
typically in RemoveBenchmark during cleanup of the BenchmarkFamilies singleton.
2014-05-05 09:42:13 -07:00
Chris Kennelly 54e18b8992 Resolve benchmark cleanup race condition in issue #20.
The multithreaded API for benchmarks provides that teardown can happen in
thread 0.  For this to be safe, all other threads executing the benchmark
function need to have exited.  Otherwise, thread 0 may begin to teardown shared
resources before the other threads have stopped using these resources as they
are in their last loop of while (KeepRunning()) { ... }.

This change creates a single exit point for KeepRunning() to return false.
When running a multithreaded benchmark, thread 0 blocks on KeepRunning() until
all other threads have exited.  This approach allows for there to be no change
to the user-facing API exemplified in the BM_MultiThreaded example.
2014-05-05 09:38:08 -07:00
Dominic Hamon efb9c302cc Merge pull request #19 from ckennelly/googletest
Remove URL_HASH and TLS_VERIFY from CMake configuration.
2014-04-23 14:32:21 -07:00
Chris Kennelly 92cd2e82af Remove URL_HASH and TLS_VERIFY from CMake configuration.
Per the CMake 2.8.0 documentation, these options did not exist for
ExternalProject_Add.  These options were added in CMake 2.8.10.
2014-04-23 14:23:20 -07:00
Dominic Hamon 8b34026908 Merge pull request #18 from ckennelly/googletest
Resolve Memory Leaks #17
2014-04-23 13:46:44 -07:00
Chris Kennelly 9f27edbb16 Resolve memory leak from benchmark instances in google/benchmark#17.
This shifts registration from a global vector to a singleton that manages
benchmark destruction during shutdown.
2014-04-23 01:17:47 -07:00
Chris Kennelly fa908926c7 Partially resolve google/benchmark#17 by fixing regular expression leak.
This adds a unit test to validate the wrapper without running the entirety of
benchmark_test.
2014-04-23 00:56:17 -07:00
Chris Kennelly 6087edda9d Add ExternalProject reference to Google Test 1.7.0. 2014-04-23 00:55:36 -07:00
Chris Kennelly e38fde6450 Setup targets from each directory, rather than the top-level. 2014-04-23 00:47:07 -07:00
Chris Kennelly 9b5ece6ece Include stddef.h for size_t. 2014-04-22 20:07:57 -07:00
Chris Kennelly 193e4eb9a1 Add Chris Kennelly to the contributors list. 2014-04-22 20:07:37 -07:00
Dominic Hamon 98e7f89d72 Merge pull request #16 from chenshuo/master
Use a new container in each round of push_back test.
2014-04-17 14:38:56 -07:00
Shuo Chen e474629b6a Add Shuo Chen to AUTHORS 2014-04-17 13:56:05 -07:00
Shuo Chen 92b6f020ea Add Shuo Chen to CONTRIBUTORS. 2014-04-17 13:55:35 -07:00
Shuo Chen 664159372c Use a new container in each round of push_back test.
Otherwise containers keep growing and uses gigabytes of memory.
2014-04-17 10:04:02 -07:00
Dominic Hamon 54cd4fd848 Merge pull request #15 from Nukesor/patch-1
Unable to compile because of unused parameter
2014-04-07 18:57:31 -07:00
Arne Beer 92cb4ec50c Update AUTHORS 2014-04-07 22:19:53 +02:00
Arne Beer feea2f022f Compile warning removed, adding myself to contributors 2014-04-06 22:03:51 +02:00
Arne Beer 50f459d2c0 Unable to compile because of unused parameter
There is a unused parameter at benchmark:866 Benchmark::MeasurePeakHeapMemory .
The function is marked as TODO and the code that uses the parameter is commented out.
I just removed the parameter so it can compile again without editing the CMake compile flags.
2014-04-06 16:42:24 +02:00
Dominic Hamon ef1ccf4dea Merge pull request #12 from showlabor/master
Fix cycleclock.h for gcc/ARM.
2014-03-20 09:54:14 -07:00
Felix Homann 44b64c9370 Added AUTHOR/CONTRIBUTOR information. 2014-03-19 08:58:21 +01:00
Felix Homann a7c57939c8 Fix cycleclock.h for gcc/ARM.
Currently there are tests for ARMV3 and ARMV6 in cycleclock.h which are not
defined using gcc on ARM. Since there is also a cast to the unknown type
int64 I assume that the ARM code has not been tested. Therefore this patch
replaces the checks for ARMV3 and ARMV6 by checks for __ARM_ARCH. Also, the
cast to int64 is fixed by casting to int64_t.
2014-03-18 17:04:40 +01:00
Chris Kennelly f835dfa807 Merge pull request #10 from Constellation/fix-segv
Ensure families is not nullptr before using it
2014-02-23 10:55:39 -08:00
Yusuke Suzuki 45b79c3e01 Check families is not nullptr before using it
When there's no benchmarks, families becomes nullptr. So before touching
it, we need to ensure families is not nullptr.
2014-02-23 20:19:07 +09:00
Pierre Phaneuf 254a6f9a78 Christopher Seymour has signed the CLA. 2014-02-13 16:18:56 -05:00
Pierre Phaneuf 6ec70d0f2b Add information about CLAs. 2014-02-12 18:51:08 -05:00
Dominic Hamon dbb0beff57 Update CONTRIBUTORS 2014-02-11 22:17:58 -08:00
Dominic Hamon 60869aa215 Update AUTHORS 2014-02-11 22:17:36 -08:00
Dominic Hamon f2d1957d23 Merge pull request #9 from iiSeymour/patch-1
Update README.md
2014-02-11 22:15:22 -08:00
Pierre Phaneuf 6200a22998 Add AUTHORS and CONTRIBUTORS files. 2014-02-10 18:32:08 -05:00
Pierre Phaneuf 99459023d9 Create CONTRIBUTING.md
Inspired from the one from https://github.com/google/go-github.
2014-02-10 17:37:54 -05:00
Chris Seymour 465cb09eb6 Update README.md
Switched to language specific markdown for code sections to provide syntax highlighting when rendered.
2014-02-09 19:45:17 +00:00
Dominic Hamon 0a1593b06f Merge pull request #8 from dcoeurjo/cmakeFix
Cmake edit with 'make install' target
2014-02-06 11:10:57 -08:00
David Coeurjolly 22f436ea84 Missing includes in install target 2014-02-05 21:07:40 +01:00
David Coeurjolly cbcf159bf2 Thread is required 2014-02-05 20:46:54 +01:00
David Coeurjolly 25074512ff Cmake edit with 'make install' target 2014-02-05 20:38:57 +01:00
Dominic Hamon be84ed0373 Remove old NOTEs 2014-01-21 19:27:04 -08:00
Eugene Zhuk 772ff6f1f1 [#4] Cleaned up FastClock background thread. 2014-01-20 23:18:25 -08:00
Eugene Zhuk ceea4cb380 [#4] A few minor changes. 2014-01-20 22:32:16 -08:00
Eugene Zhuk 4ed4ff9574 Fix shutting down FastClock's thread on OSX. 2014-01-18 00:50:45 -08:00
Dominic Hamon d184b2be2b Move linux-only variable into linux/cygwin block 2014-01-16 13:20:59 -08:00
Dominic Hamon e2633b9bd7 sysinfo conditional compilation fixes for OSX 2014-01-16 09:13:18 -08:00
Dominic Hamon 076f0df7fc Better include path for YCM users 2014-01-16 09:12:59 -08:00
Dominic Hamon d098d4c12e For those using YCM 2014-01-15 16:11:09 -08:00
Dominic Hamon c44662e7e9 Missing headers for sysctl stuff on OSX 2014-01-15 16:09:18 -08:00