[compiler-rt] r204610 - tsan: reduce default number of threads in benchmarks
Dmitry Vyukov
dvyukov at google.com
Mon Mar 24 08:23:06 PDT 2014
Author: dvyukov
Date: Mon Mar 24 10:23:05 2014
New Revision: 204610
URL: http://llvm.org/viewvc/llvm-project?rev=204610&view=rev
Log:
tsan: reduce default number of threads in benchmarks
buildbots seem to OOM with that many threads
Modified:
compiler-rt/trunk/test/tsan/bench.h
Modified: compiler-rt/trunk/test/tsan/bench.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/bench.h?rev=204610&r1=204609&r2=204610&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/bench.h (original)
+++ compiler-rt/trunk/test/tsan/bench.h Mon Mar 24 10:23:05 2014
@@ -23,9 +23,11 @@ int main(int argc, char **argv) {
bench_niter = atoi(argv[2]);
// Grow thread's clock.
- const int kClockSize = 1000;
- pthread_barrier_init(&glow_clock_barrier, 0, kClockSize);
- start_thread_group(kClockSize, grow_clock_worker);
+ int clock_size = 10;
+ if (argc > 1)
+ clock_size = 1000;
+ pthread_barrier_init(&glow_clock_barrier, 0, clock_size);
+ start_thread_group(clock_size, grow_clock_worker);
pthread_barrier_destroy(&glow_clock_barrier);
__atomic_load_n(&grow_clock_var, __ATOMIC_ACQUIRE);
More information about the llvm-commits
mailing list