summaryrefslogtreecommitdiffstats
path: root/compiler-rt/unittests
diff options
context:
space:
mode:
authorJulian Lettner <jlettner@apple.com>2019-02-27 19:06:20 +0000
committerJulian Lettner <jlettner@apple.com>2019-02-27 19:06:20 +0000
commit6eef7d05249fb88bf5b31289f4c27d75f50c1ae4 (patch)
treeae2d29245574c1859e9fcf32f85c2ad7e50ab47d /compiler-rt/unittests
parentb65a8ad761c34a4c2eeec1385c2e00c9a51086d0 (diff)
downloadbcm5719-llvm-6eef7d05249fb88bf5b31289f4c27d75f50c1ae4.tar.gz
bcm5719-llvm-6eef7d05249fb88bf5b31289f4c27d75f50c1ae4.zip
[Darwin][NFC] Refactor throttling of 64bit sanitizer tests on Darwin
Underlying condition for throttling is "has large mmap'd regions" (i.e., shadow memory) and not sanitizers in general (e.g., UBSan does not need to be throttled). Rename parallelism group `darwin-64bit-sanitizer` to `shadow-memory` and apply it unconditionally to all tests which require it. We can then have all the Darwin throttling logic in one place in the commen lit config. Throttle sanitizer_common unit tests. Configuration was previously missing from sanitizer_common/Unit/lit.site.cfg. Reviewed by: kubamracek Differential Revision: https://reviews.llvm.org/D58677 llvm-svn: 355018
Diffstat (limited to 'compiler-rt/unittests')
-rw-r--r--compiler-rt/unittests/lit.common.unit.cfg8
-rw-r--r--compiler-rt/unittests/lit_unittest_cfg_utils.py6
2 files changed, 7 insertions, 7 deletions
diff --git a/compiler-rt/unittests/lit.common.unit.cfg b/compiler-rt/unittests/lit.common.unit.cfg
index 31206e913bf..fba034ae4fc 100644
--- a/compiler-rt/unittests/lit.common.unit.cfg
+++ b/compiler-rt/unittests/lit.common.unit.cfg
@@ -30,10 +30,10 @@ if 'TEMP' in os.environ:
config.environment['TEMP'] = os.environ['TEMP']
if config.host_os == 'Darwin':
- # Only run up to 3 64-bit sanitized processes simultaneously on Darwin.
- # Using more scales badly and hogs the system due to inefficient handling
- # of large mmap'd regions (terabytes) by the kernel.
- lit_config.parallelism_groups["darwin-64bit-sanitizer"] = 3
+ # 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.
+ lit_config.parallelism_groups["shadow-memory"] = 3
# 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.
diff --git a/compiler-rt/unittests/lit_unittest_cfg_utils.py b/compiler-rt/unittests/lit_unittest_cfg_utils.py
index ff7b1ee0140..721e81b9d60 100644
--- a/compiler-rt/unittests/lit_unittest_cfg_utils.py
+++ b/compiler-rt/unittests/lit_unittest_cfg_utils.py
@@ -1,4 +1,4 @@
-# Put all 64-bit sanitizer tests in the darwin-64bit-sanitizer parallelism
-# group. This will only run three of them concurrently.
+# Put all 64-bit tests in the shadow-memory parallelism group. We throttle those
+# in our common lit config (lit.common.unit.cfg).
def darwin_sanitizer_parallelism_group_func(test):
- return "darwin-64bit-sanitizer" if "x86_64" in test.file_path else ""
+ return "shadow-memory" if "x86_64" in test.file_path else None
OpenPOWER on IntegriCloud