diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2021-07-30 08:35:11 +0200 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2021-07-30 11:39:38 +0200 |
commit | 97795be22f634667ce7a022398c59ccc9f7440eb (patch) | |
tree | ed4186259576a6c928bfd3738f46c5bd9f2ba4e6 /lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp | |
parent | dbe36e4073e708816cbeb693ea52832f54f52f2a (diff) | |
download | llvm-97795be22f634667ce7a022398c59ccc9f7440eb.zip llvm-97795be22f634667ce7a022398c59ccc9f7440eb.tar.gz llvm-97795be22f634667ce7a022398c59ccc9f7440eb.tar.bz2 |
tsan: optimize test-only barrier
The updated lots_of_threads.c test with 300 threads
started running for too long on machines with low
hardware parallelism (e.g. taskset -c 0-1).
On lots of CPUs it finishes in ~2 secs. But with
taskset -c 0-1 it runs for hundreds of seconds
effectively spinning in the barrier in the sleep loop.
We now have the handy futex API in sanitizer_common.
Use it instead of the passive spin loop.
It makes the test run only faster with taskset -c 0-1,
it runs for ~1.5 secs, while with full parallelism
it still runs for ~2 secs (but consumes less CPU time).
Depends on D107131.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D107132
Diffstat (limited to 'lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp')
0 files changed, 0 insertions, 0 deletions