summaryrefslogtreecommitdiffstats
path: root/compiler-rt/unittests
diff options
context:
space:
mode:
authorKuba Mracek <mracek@apple.com>2017-01-17 17:18:18 +0000
committerKuba Mracek <mracek@apple.com>2017-01-17 17:18:18 +0000
commita802a5096330d121d0394d5a3a0f924feec51853 (patch)
tree38ecb6ab30747a2aa0d9ae04c44a0780d08e20a6 /compiler-rt/unittests
parent53013e9e6fe65e87de2c7eb42570871e4e34ab01 (diff)
downloadbcm5719-llvm-a802a5096330d121d0394d5a3a0f924feec51853.tar.gz
bcm5719-llvm-a802a5096330d121d0394d5a3a0f924feec51853.zip
[lit] Limit parallelism of sanitizer tests on Darwin [compiler-rt part]
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 llvm-svn: 292232
Diffstat (limited to 'compiler-rt/unittests')
-rw-r--r--compiler-rt/unittests/lit.common.unit.cfg7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler-rt/unittests/lit.common.unit.cfg b/compiler-rt/unittests/lit.common.unit.cfg
index 2bd8f376f00..cd66f559925 100644
--- a/compiler-rt/unittests/lit.common.unit.cfg
+++ b/compiler-rt/unittests/lit.common.unit.cfg
@@ -28,3 +28,10 @@ if 'TMP' in os.environ:
config.environment['TMP'] = os.environ['TMP']
if 'TEMP' in os.environ:
config.environment['TEMP'] = os.environ['TEMP']
+
+def darwin_sanitizer_parallelism_group_func(test):
+ if test.config.host_os == "Darwin":
+ if test.file_path.find("x86_64") != -1:
+ return "darwin-64bit-sanitizer"
+ return ""
+config.darwin_sanitizer_parallelism_group_func = darwin_sanitizer_parallelism_group_func
OpenPOWER on IntegriCloud