summaryrefslogtreecommitdiff
path: root/compiler-rt/unittests
diff options
context:
space:
mode:
authorJulian Lettner <julian.lettner@apple.com>2022-03-30 10:24:11 -0700
committerJulian Lettner <julian.lettner@apple.com>2022-03-31 14:43:28 -0700
commita5228bcaad9c57e7ede95d900a730c59f5243d35 (patch)
tree15f1a01a42b81a15a83686837e371de9c1ab1113 /compiler-rt/unittests
parent1f7b58f2a50461493f083b2ed807b25e036286f6 (diff)
[Darwin] Limit parallelism for sanitizer tests that use shadow memory on AS
On Darwin, we want to limit the parallelism during test execution for sanitizer tests that use shadow memory. The reason is explained by this existing comment: > Only run up to 3 processes that require shadow memory simultaneously > on 64-bit Darwin. Using more scales badly and hogs the system due to > inefficient handling of large mmap'd regions (terabytes) by the > kernel. Previously we detected 3 cases: * on-device: limit to 1 process * 64-bit: macOS & simulators, limit to 3 processes * others (32-bit): no limitation We checked for the 64-bit case like this: `if arch in ['x86_64', 'x86_64h']` which misses macOS running on AS. Additionally, we don't care about 32-bit anymore, so I've simplified this to 2 cases: on-device and everything else. Differential Revision: https://reviews.llvm.org/D122751
Diffstat (limited to 'compiler-rt/unittests')
-rw-r--r--compiler-rt/unittests/lit.common.unit.cfg.py10
-rw-r--r--compiler-rt/unittests/lit_unittest_cfg_utils.py4
2 files changed, 0 insertions, 14 deletions
diff --git a/compiler-rt/unittests/lit.common.unit.cfg.py b/compiler-rt/unittests/lit.common.unit.cfg.py
index 11d99980f841..c72b06d6b5f3 100644
--- a/compiler-rt/unittests/lit.common.unit.cfg.py
+++ b/compiler-rt/unittests/lit.common.unit.cfg.py
@@ -50,13 +50,3 @@ if config.host_os == 'Darwin':
#
# rdar://80086125
config.environment['MallocNanoZone'] = '0'
-
- # The test config gets pickled and sent to multiprocessing workers, and that
- # only works for code if it is stored at the top level of some module.
- # Therefore, we have to put the code in a .py file, add it to path, and import
- # it to store it in the config.
- import site
- site.addsitedir(os.path.dirname(__file__))
- import lit_unittest_cfg_utils
- config.darwin_sanitizer_parallelism_group_func = \
- lit_unittest_cfg_utils.darwin_sanitizer_parallelism_group_func
diff --git a/compiler-rt/unittests/lit_unittest_cfg_utils.py b/compiler-rt/unittests/lit_unittest_cfg_utils.py
deleted file mode 100644
index 16281f0b48e1..000000000000
--- a/compiler-rt/unittests/lit_unittest_cfg_utils.py
+++ /dev/null
@@ -1,4 +0,0 @@
-# Put all 64-bit tests in the shadow-memory parallelism group. We throttle those
-# in our common lit config (lit.common.unit.cfg.py).
-def darwin_sanitizer_parallelism_group_func(test):
- return "shadow-memory" if "x86_64" in test.file_path else None