diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2014-03-24 15:23:05 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2014-03-24 15:23:05 +0000 |
commit | 6c8301b1407d12528f65ae69fddaf2c72e0916b6 (patch) | |
tree | 3198bba1d36f277ed42c9ad82f3246e66086b242 /test/tsan | |
parent | d491821dba7a2d73739d4c888d14eadd90471012 (diff) | |
download | compiler-rt-6c8301b1407d12528f65ae69fddaf2c72e0916b6.tar.gz |
tsan: reduce default number of threads in benchmarks
buildbots seem to OOM with that many threads
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tsan')
-rw-r--r-- | test/tsan/bench.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/tsan/bench.h b/test/tsan/bench.h index 4e8fce212..5ae0dd813 100644 --- a/test/tsan/bench.h +++ b/test/tsan/bench.h @@ -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); |