summaryrefslogtreecommitdiff
path: root/test/asan/Unit
diff options
context:
space:
mode:
authorKuba Mracek <mracek@apple.com>2017-01-20 00:25:01 +0000
committerKuba Mracek <mracek@apple.com>2017-01-20 00:25:01 +0000
commit212ca9be08d3d542f8929754e651d42a6138fc41 (patch)
treebe3b366ba1107e8fd6d795d2bae5cc89fcdf392b /test/asan/Unit
parent79a2f4d44fc6f4fa55ecc5c9c14b72dc88362648 (diff)
[lit] Limit parallelism of sanitizer tests on Darwin [compiler-rt part, take 2]
Running lit tests and unit tests of ASan and TSan on macOS has very bad performance when running with a high number of threads. This is caused by xnu (the macOS kernel), which currently doesn't handle mapping and unmapping of sanitizer shadow regions (reserved VM which are several terabytes large) very well. The situation is so bad that increasing the number of threads actually makes the total testing time larger. The macOS buildbots are affected by this. Note that we can't easily limit the number of sanitizer testing threads without affecting the rest of the tests. This patch adds a special "group" into lit, and limits the number of concurrently running tests in this group. This helps solve the contention problem, while still allowing other tests to run in full, that means running lit with -j8 will still with 8 threads, and parallelism is only limited in sanitizer tests. Differential Revision: https://reviews.llvm.org/D28420 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@292549 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/asan/Unit')
-rw-r--r--test/asan/Unit/lit.site.cfg.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/asan/Unit/lit.site.cfg.in b/test/asan/Unit/lit.site.cfg.in
index 55631a6d9..1c59a6bad 100644
--- a/test/asan/Unit/lit.site.cfg.in
+++ b/test/asan/Unit/lit.site.cfg.in
@@ -27,3 +27,6 @@ config.test_source_root = config.test_exec_root
# Set LD_LIBRARY_PATH to pick dynamic runtime up properly.
push_ld_library_path(config, config.compiler_rt_libdir)
+
+if config.host_os == 'Darwin':
+ config.parallelism_group = config.darwin_sanitizer_parallelism_group_func